mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-25 16:13:10 +08:00
Add Deepseek Chat support and fix query results display (#179)
This commit is contained in:
@ -43,6 +43,13 @@ const OpenAIApiConfigView = () => {
|
||||
disabled: false,
|
||||
tooltip: "",
|
||||
},
|
||||
{
|
||||
id: "deepseek-chat",
|
||||
title: `Deepseek Chat`,
|
||||
cost: 1,
|
||||
disabled: false,
|
||||
tooltip: "",
|
||||
},
|
||||
];
|
||||
|
||||
const maskedKey = (str: string) => {
|
||||
|
@ -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 "";
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user