Skip to content

Commit

Permalink
Merge pull request #1586 from zhourunlai/volcengine_model
Browse files Browse the repository at this point in the history
feat: update volcengine model
  • Loading branch information
shakkernerd authored Dec 31, 2024
2 parents 46b3ba0 + f70293a commit 59ae83a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
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

0 comments on commit 59ae83a

Please sign in to comment.