Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teerasej/nextflow-semantic-kernel-python-pycon-2023
https://github.com/teerasej/nextflow-semantic-kernel-python-pycon-2023
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/teerasej/nextflow-semantic-kernel-python-pycon-2023
- Owner: teerasej
- Created: 2023-12-16T03:36:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-12T02:33:39.000Z (10 months ago)
- Last Synced: 2024-04-13T19:04:49.380Z (9 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Semantic Kernel Python Starter
## Easy-to-Manage AI with Python and Semantic Kernel
This project showcases the power of Semantic Kernel for building manageable and improvable AI applications in Python. Semantic Kernel provides a framework that simplifies the development and maintenance of AI interactions.
Here's what you'll find in this repository:
* **Code examples:** We demonstrate how to leverage Semantic Kernel's core functionalities like prompt templates and functions. These examples showcase how to interact with Large Language Models (LLMs) for tasks like text summarization or question answering.
* **Modular design:** The code is designed with modularity in mind. Semantic Kernel allows you to define reusable prompt templates that encapsulate the core functionalities of your AI application. This makes it easier to modify and improve specific aspects without affecting the entire codebase.
* **Clear structure:** The code is well-structured and easy to follow, making it understandable even for those new to Semantic Kernel.By exploring this project, you'll gain insights into how Semantic Kernel can streamline the development of manageable and adaptable AI applications using Python.
## Prerequisites
- [Python](https://www.python.org/downloads/) 3.8 and above
- [Poetry](https://python-poetry.org/) is used for packaging and dependency management
- [Semantic Kernel Tools](https://marketplace.visualstudio.com/items?itemName=ms-semantic-kernel.semantic-kernel)## Configuring the starter
The starter can be configured with a `.env` file in the project which holds api keys and other secrets and configurations.
Make sure you have an
[Open AI API Key](https://openai.com/api/) or
[Azure Open AI service key](https://learn.microsoft.com/azure/cognitive-services/openai/quickstart?pivots=rest-api)Copy the `.env.example` file to a new file named `.env`. Then, copy those keys into the `.env` file:
```
OPENAI_API_KEY=""
OPENAI_ORG_ID=""
AZURE_OPENAI_DEPLOYMENT_NAME=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_KEY=""
```## Running the starter
To run the console application within Visual Studio Code, just hit `F5`.
As configured in `launch.json` and `tasks.json`, Visual Studio Code will run `poetry install` followed by `python hello_world/main.py`To build and run the console application from the terminal use the following commands:
```powershell
poetry install
poetry run python hello_world/main.py
```