Skip to content

michaeltansg/mock-openai-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uvicorn app:app --reload uvicorn app:app --host 0.0.0.0 --port 8000 --reload

curl http://localhost:8000/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer xxxx"
-d '{ "model": "gpt-4o", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ], "stream": true }'

{ "id": "chatcmpl-FindQX3pWVbTgFx5hv11UgWNMUS90a", "object": "chat.completion.chunk", "created": 1716545324, "model": "fake-model", "choices": [ { "index": 0, "delta": {}, "logprobs": null, "finish_reason": "stop" } ], "system_fingerprint": null, "citations": [ { "source": "", "page": "", "link": "", "metadata": "" } ] }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages