This repo provides a simple Python script and a config.json file (for VS Code Extension Continue) to interact with the DIZ Llama API. The script sends a prompt to the API and returns the response.
- Python 3.x
requestslibrarypython-dotenvlibrary
You can install the required libraries using pip:
pip install requests python-dotenv- Clone the repository or download the
DIZ_llama_api.pyfile. - Create a
.envfile in the root directory and add the following variables:
DIZ_API_KEY=sk-XXX...XXXReplace sk-XXX...XXX with your actual API key.
The API endpoint and headers are defined in the script:
url = "https://ki-plattform.diz-ag.med.ovgu.de/api/chat/completions"
headers = {
"Authorization": f"Bearer {DIZ_API_KEY}",
"Content-Type": "application/json"
}- Install Continue in VS Code.
- Open Continue Config.
- Change the
config.json(use the config.json template). - Replace
sk-XXX...XXXwith your actual API key.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.