Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: serve all LLMs as OpenAI-compatible API #431

Merged
merged 2 commits into from
Apr 23, 2024
Merged

feat: serve all LLMs as OpenAI-compatible API #431

merged 2 commits into from
Apr 23, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Apr 23, 2024

$ aichat --serve
Access the API server at: http://0.0.0.0:8080/v1/chat/completions
curl http://127.0.0.1:8080/v1/chat/completions \
  -i -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai:gpt-3.5-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
  }'

Note: Users can use default model name to select currently active model.

@sigoden sigoden merged commit 0a4c041 into main Apr 23, 2024
3 checks passed
@sigoden sigoden deleted the feat-api branch April 23, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant