Add Deepseek Chat support and fix query results display (#179)

This commit is contained in:
Edinson Sanchez
2025-04-07 01:16:06 -05:00
committed by GitHub
parent b9df834fd8
commit 57af08d721
3 changed files with 19 additions and 2 deletions

View File

@ -43,6 +43,13 @@ const OpenAIApiConfigView = () => {
disabled: false,
tooltip: "",
},
{
id: "deepseek-chat",
title: `Deepseek Chat`,
cost: 1,
disabled: false,
tooltip: "",
},
];
const maskedKey = (str: string) => {

View File

@ -4,7 +4,8 @@ export const getMessageFromExecutionResult = (result: ExecutionResult): string =
if (result.error) {
return result.error;
}
if (result.affectedRows) {
// Only return the "rows affected" message if there are no raw results to display
if (result.affectedRows && (!result.rawResult || result.rawResult.length === 0)) {
return `${result.affectedRows} rows affected.`;
}
return "";

View File

@ -34,7 +34,16 @@ const gpt4ho = {
cost_per_call: 10,
};
export const models = [gpt35turbo, gpt4, gpt4turbo, gpt4ho];
const deepseekChat = {
name: "deepseek-chat",
temperature: 0,
frequency_penalty: 0.0,
presence_penalty: 0.0,
max_token: 12000,
cost_per_call: 1,
};
export const models = [gpt35turbo, gpt4, gpt4turbo, gpt4ho, deepseekChat];
export const getModel = (name: string) => {
for (const model of models) {