Merge branch 'release' into staging

This commit is contained in:
Cohee
2024-04-15 00:26:43 +03:00
4 changed files with 33 additions and 3 deletions

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: [],