forked from songquanpeng/one-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Novita AI as model provider (songquanpeng#1609)
- Loading branch information
1 parent
457abc0
commit 3c147e1
Showing
9 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package novita | ||
|
||
// https://novita.ai/llm-api | ||
|
||
var ModelList = []string{ | ||
"meta-llama/llama-3-8b-instruct", | ||
"meta-llama/llama-3-70b-instruct", | ||
"nousresearch/hermes-2-pro-llama-3-8b", | ||
"nousresearch/nous-hermes-llama2-13b", | ||
"mistralai/mistral-7b-instruct", | ||
"cognitivecomputations/dolphin-mixtral-8x22b", | ||
"sao10k/l3-70b-euryale-v2.1", | ||
"sophosympatheia/midnight-rose-70b", | ||
"gryphe/mythomax-l2-13b", | ||
"Nous-Hermes-2-Mixtral-8x7B-DPO", | ||
"lzlv_70b", | ||
"teknium/openhermes-2.5-mistral-7b", | ||
"microsoft/wizardlm-2-8x22b", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package novita | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/songquanpeng/one-api/relay/meta" | ||
"github.com/songquanpeng/one-api/relay/relaymode" | ||
) | ||
|
||
func GetRequestURL(meta *meta.Meta) (string, error) { | ||
if meta.Mode == relaymode.ChatCompletions { | ||
return fmt.Sprintf("%s/chat/completions", meta.BaseURL), nil | ||
} | ||
return "", fmt.Errorf("unsupported relay mode %d for novita", meta.Mode) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,6 @@ const ( | |
DeepL | ||
TogetherAI | ||
Doubao | ||
Novita | ||
Dummy | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters