Skip to content

Self Service Azure API Key generation for Developers

Notifications You must be signed in to change notification settings

bat-bs/openai-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 25, 2025
08b175d · Mar 25, 2025

History

62 Commits
Dec 10, 2024
Mar 25, 2025
Nov 14, 2024
Oct 28, 2024
Nov 14, 2024
Mar 25, 2025
Dec 10, 2024
Oct 9, 2024
Dec 10, 2024
Oct 9, 2024
Oct 28, 2024
Mar 28, 2024
Sep 3, 2024
Oct 15, 2024
Oct 15, 2024
Aug 29, 2024

Repository files navigation

openai-proxy

Build

git clone git@github.com:bat-bs/openai-proxy.git
cd openai-proxy
go build cmd/main.go 

Run

  1. Create your own .env file with the .env.example You can use the following Link as a reference for filling the Values: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning

  2. ./main

  3. Generate Key in Web ui

  4. Use it:

payload="{\"messages\":[{\"role\":\"system\",\"content\":[{\"type\":\"text\",\"text\":\"You are an AI assistant that helps people find information.\"}]}],\"temperature\":0.7,\"top_p\":0.95,\"max_tokens\":800,\"model\":\"gpt-4o\"}"

curl "http://localhost:8082/api/chat/completions" \
  -H "Content-Type: application/json"  \
  -H "Authorization: Bearer <Key-From-Web-UI>" \
  -d "$payload"

Todo

For Open Tasks i use the Github Issues.