mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-17 03:57:27 +00:00
feat: add OpenRouter service template (#581)
This commit is contained in:
parent
e96f6a418a
commit
6aee749ade
2 changed files with 21 additions and 0 deletions
|
|
@ -99,6 +99,22 @@ enum class CustomServiceChatCompletionTemplate(
|
|||
"max_tokens" to 1024
|
||||
)
|
||||
)
|
||||
),
|
||||
OPEN_ROUTER(
|
||||
"https://openrouter.ai/api/v1/chat/completions",
|
||||
getDefaultHeaders(
|
||||
mapOf(
|
||||
"Authorization" to "Bearer \$CUSTOM_SERVICE_API_KEY",
|
||||
"HTTP-Referer" to "https://plugins.jetbrains.com/plugin/21056-codegpt",
|
||||
"X-Title" to "CodeGPT"
|
||||
)
|
||||
),
|
||||
getDefaultBodyParams(
|
||||
mapOf(
|
||||
"model" to "meta-llama/llama-3-8b-instruct:free",
|
||||
"max_tokens" to 1024
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,11 @@ enum class CustomServiceTemplate(
|
|||
"Mistral AI",
|
||||
"https://docs.mistral.ai/getting-started/quickstart",
|
||||
CustomServiceChatCompletionTemplate.MISTRAL_AI
|
||||
),
|
||||
OPEN_ROUTER(
|
||||
"OpenRouter",
|
||||
"https://openrouter.ai/docs#quick-start",
|
||||
CustomServiceChatCompletionTemplate.OPEN_ROUTER
|
||||
);
|
||||
|
||||
override fun toString(): String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue