Files
semantic-kernel/python/samples/concepts
Evan Mattson 93df57e635 Python: Bump Python version to 1.3.0 from 1.2.0 for a release. (#7408)
### Motivation and Context

Bump Python version to 1.3.0 from 1.2.0 for a release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bump Python version to 1.3.0 from 1.2.0 for a release.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-07-23 10:50:38 -04:00
..
2024-06-14 19:04:44 +00:00

Semantic Kernel Concepts by Feature

This section contains code snippets that demonstrate the usage of Semantic Kernel features.

Features Description
Agents Creating and using agents in Semantic Kernel
AutoFunctionCalling Using Auto Function Calling to allow function call capable models to invoke Kernel Functions automatically
ChatCompletion Using ChatCompletion messaging capable service with models
Filtering Creating and using Filters
Functions Invoking Method or Prompt functions with Kernel
Grounding An example of how to perform LLM grounding
Local Models Using the OpenAI connector to talk to models hosted locally in Ollama and LM Studio
Logging Showing how to set up logging
Memory Using Memory AI concepts
Model-as-a-Service Using models deployed as serverless APIs on Azure AI Studio to benchmark model performance against open-source datasets
On Your Data Examples of using AzureOpenAI On Your Data
Planners Showing the uses of Planners
Plugins Different ways of creating and using Plugins
PromptTemplates Using Templates with parametrization for Prompt rendering
RAG Different ways of RAG (Retrieval-Augmented Generation)
Search Using search services information
Service Selector Shows how to create and use a custom service selector class.
Setup How to setup environment variables for Semantic Kernel
TextGeneration Using TextGeneration capable service with models

Configuring the Kernel

In Semantic Kernel for Python, we leverage Pydantic Settings to manage configurations for AI and Memory Connectors, among other components. Here’s a clear guide on how to configure your settings effectively:

Steps for Configuration

  1. Reading Environment Variables:

    • Primary Source: Pydantic first attempts to read the required settings from environment variables.
  2. Using a .env File:

    • Fallback Source: If the required environment variables are not set, Pydantic will look for a .env file in the current working directory.
    • Custom Path (Optional): You can specify an alternative path for the .env file via env_file_path. This can be either a relative or an absolute path.
  3. Direct Constructor Input:

    • As an alternative to environment variables and .env files, you can pass the required settings directly through the constructor of the AI Connector or Memory Connector.

Best Practices

  • .env File Placement: We highly recommend placing the .env file in the semantic-kernel/python root directory. This is a common practice when developing in the Semantic Kernel repository.

By following these guidelines, you can ensure that your settings for various components are configured correctly, enabling seamless functionality and integration of Semantic Kernel in your Python projects.