git clone [email protected]:bat-bs/openai-proxy.git
cd openai-proxy
go build cmd/main.go
-
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
-
./main
-
Generate Key in Web ui
-
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"
For Open Tasks i use the Github Issues.