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: support github client #798

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ OPENAI_COMPATIBLE_PLATFORMS=( \
together,meta-llama/Llama-3-8b-chat-hf,https://api.together.xyz/v1 \
zhipuai,glm-4-0520,https://open.bigmodel.cn/api/paas/v4 \
lingyiwanwu,yi-large,https://api.lingyiwanwu.com/v1 \
github,meta-llama-3.1-8b-instruct,https://models.inference.ai.azure.com \
)

# @cmd Chat with any LLM api
Expand Down
6 changes: 6 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ clients:
api_key: xxx
api_base: https://api.deepinfra.com/v1/openai

# See https://github.com/marketplace/models
- type: openai-compatible
name: github
api_key: xxx
api_base: https://models.inference.ai.azure.com

# See https://readme.fireworks.ai/docs/quickstart
- type: openai-compatible
name: fireworks
Expand Down
38 changes: 38 additions & 0 deletions models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,44 @@
input_price: 0.14
output_price: 0.14

- platform: github
# docs:
# - https://github.com/marketplace/models
# - https://deepinfra.com/pricing
models:
- name: gpt-4o
max_input_tokens: 128000
supports_function_calling: true
- name: gpt-4o-mini
max_input_tokens: 128000
supports_function_calling: true
- name: meta-llama-3.1-405b-instruct
max_input_tokens: 128000
- name: meta-llama-3.1-70b-instruct
max_input_tokens: 128000
- name: meta-llama-3.1-8b-instruct
max_input_tokens: 128000
- name: meta-llama-3-70b-instruct
max_input_tokens: 8192
- name: meta-llama-3-8b-instruct
max_input_tokens: 8192
- name: mistral-large-2407
max_input_tokens: 128000
supports_function_calling: true
- name: mistral-nemo
max_input_tokens: 128000
supports_function_calling: true
- name: cohere-command-r-plus
max_input_tokens: 128000
supports_function_calling: true
- name: cohere-command-r
max_input_tokens: 128000
supports_function_calling: true
- name: phi-3-medium-128k-instruct
max_input_tokens: 128000
- name: phi-3-mini-128k-instruct
max_input_tokens: 128000

- platform: deepinfra
# docs:
# - https://deepinfra.com/models
Expand Down
3 changes: 2 additions & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ register_client!(
(qianwen, "qianwen", QianwenConfig, QianwenClient),
);

pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 14] = [
pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 15] = [
("deepinfra", "https://api.deepinfra.com/v1/openai"),
("deepseek", "https://api.deepseek.com"),
("fireworks", "https://api.fireworks.ai/inference/v1"),
("github", "https://models.inference.ai.azure.com"),
("groq", "https://api.groq.com/openai/v1"),
("jina", "https://api.jina.ai/v1"),
("lingyiwanwu", "https://api.lingyiwanwu.com/v1"),
Expand Down