Merge branch 'staging' into neo-server

This commit is contained in:
Cohee
2024-04-15 00:26:52 +03:00
10 changed files with 276 additions and 81 deletions

View File

@@ -271,8 +271,8 @@ const OLLAMA_KEYS = [
'mirostat_eta',
];
const AVATAR_WIDTH = 400;
const AVATAR_HEIGHT = 600;
const AVATAR_WIDTH = 512;
const AVATAR_HEIGHT = 768;
const OPENROUTER_HEADERS = {
'HTTP-Referer': 'https://sillytavern.app',

View File

@@ -567,6 +567,13 @@ async function sendCohereRequest(request, response) {
try {
const convertedHistory = convertCohereMessages(request.body.messages, request.body.char_name, request.body.user_name);
const connectors = [];
if (request.body.websearch) {
connectors.push({
id: 'web-search',
});
}
// https://docs.cohere.com/reference/chat
const requestBody = {
@@ -584,7 +591,7 @@ async function sendCohereRequest(request, response) {
frequency_penalty: request.body.frequency_penalty,
presence_penalty: request.body.presence_penalty,
prompt_truncation: 'AUTO_PRESERVE_ORDER',
connectors: [], // TODO
connectors: connectors,
documents: [],
tools: [],
tool_results: [],