Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.24 KB

README.md

File metadata and controls

42 lines (33 loc) · 1.24 KB

DIZ AI API

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.

Prerequisites

  • Python 3.x
  • requests library
  • python-dotenv library

You can install the required libraries using pip:

pip install requests python-dotenv

Setup

  1. Clone the repository or download the DIZ_llama_api.py file.
  2. Create a .env file in the root directory and add the following variables:
DIZ_API_KEY=sk-XXX...XXX

Replace sk-XXX...XXX with your actual API key.

Configuration

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"
}

How to use DIZ deepseek-coder in VS Code

  1. Install Continue in VS Code.
  2. Open Continue Config.
  3. Change the config.json (use the config.json template).
  4. Replace sk-XXX...XXX with your actual API key.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.