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: update volcengine model #1586

Merged
merged 2 commits into from
Dec 31, 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
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ LARGE_GAIANET_SERVER_URL= # Default: https://qwen72b.gaia.domains/v1
GAIANET_EMBEDDING_MODEL=
USE_GAIANET_EMBEDDING= # Set to TRUE for GAIANET/768, leave blank for local

# Volcengine Configuration
VOLENGINE_API_URL= # Volcengine API Endpoint, Default: https://open.volcengineapi.com/api/v3/
VOLENGINE_MODEL=
SMALL_VOLENGINE_MODEL= # Default: doubao-lite-128k
MEDIUM_VOLENGINE_MODEL= # Default: doubao-pro-128k
LARGE_VOLENGINE_MODEL= # Default: doubao-pro-256k
VOLENGINE_EMBEDDING_MODEL= # Default: doubao-embedding

# EVM
EVM_PRIVATE_KEY=
EVM_PROVIDER_URL=
Expand Down
21 changes: 16 additions & 5 deletions packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export const models: Models = {
},
},
[ModelProviderName.VOLENGINE]: {
endpoint: "https://open.volcengineapi.com/api/v3/",
endpoint: settings.VOLENGINE_API_URL || "https://open.volcengineapi.com/api/v3/",
settings: {
stop: [],
maxInputTokens: 128000,
Expand All @@ -405,10 +405,21 @@ export const models: Models = {
temperature: 0.6,
},
model: {
[ModelClass.SMALL]: "doubao-lite-128k",
[ModelClass.MEDIUM]: "doubao-pro-128k",
[ModelClass.LARGE]: "doubao-pro-128k",
[ModelClass.EMBEDDING]: "doubao-embedding",
[ModelClass.SMALL]:
settings.SMALL_VOLENGINE_MODEL ||
settings.VOLENGINE_MODEL ||
"doubao-lite-128k",
[ModelClass.MEDIUM]:
settings.MEDIUM_VOLENGINE_MODEL ||
settings.VOLENGINE_MODEL ||
"doubao-pro-128k",
[ModelClass.LARGE]:
settings.LARGE_VOLENGINE_MODEL ||
settings.VOLENGINE_MODEL ||
"doubao-pro-256k",
[ModelClass.EMBEDDING]:
settings.VOLENGINE_EMBEDDING_MODEL ||
"doubao-embedding",
},
},
[ModelProviderName.NANOGPT]: {
Expand Down
Loading