handles gemini ai test message from sillytavern

This commit is contained in:
nai-degen 2024-10-12 09:01:08 -05:00
parent ba4532b38d
commit 13aa55cd3d
2 changed files with 9 additions and 1 deletions

View File

@ -143,8 +143,15 @@ const handleTestMessage: RequestHandler = (req, res) => {
completion: "Hello!",
// anthropic chat
content: [{ type: "text", text: "Hello!" }],
// gemini
candidates: [
{
content: { parts: [{ text: "Hello!" }] },
finishReason: "stop",
},
],
proxy_note:
"This response was generated by the proxy's test message handler and did not go to the API.",
"SillyTavern connection test detected. Your prompt was not sent to the actual model and this response was generated by the proxy.",
});
}
};

View File

@ -16,6 +16,7 @@ type AliasModelId = string;
type ModuleAliasTuple = [ParentModelId, ...AliasModelId[]];
const KNOWN_MODEL_IDS: ModuleAliasTuple[] = [
["anthropic.claude-instant-v1"],
["anthropic.claude-v2", "anthropic.claude-v2:1"],
["anthropic.claude-3-sonnet-20240229-v1:0"],
["anthropic.claude-3-haiku-20240307-v1:0"],