feat: add Mistral AI service template (#532)

This commit is contained in:
Phil 2024-05-07 17:01:07 +02:00 committed by GitHub
parent 2c0a28a912
commit 33aa0e1065
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -89,6 +89,16 @@ enum class CustomServiceChatCompletionTemplate(
"http://localhost:8080/v1/chat/completions",
getDefaultHeaders(),
getDefaultBodyParams(emptyMap())
),
MISTRAL_AI(
"https://api.mistral.ai/v1/chat/completions",
getDefaultHeaders("Authorization", "Bearer \$CUSTOM_SERVICE_API_KEY"),
getDefaultBodyParams(
mapOf(
"model" to "open-mistral-7b",
"max_tokens" to 1024
)
)
);
}

View file

@ -61,6 +61,11 @@ enum class CustomServiceTemplate(
"LLaMA C/C++",
"https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md",
CustomServiceChatCompletionTemplate.LLAMA_CPP
),
MISTRAL_AI(
"Mistral AI",
"https://docs.mistral.ai/getting-started/quickstart",
CustomServiceChatCompletionTemplate.MISTRAL_AI
);
override fun toString(): String {