update visuals to say gpt-4o-mini

This commit is contained in:
sawka 2024-08-28 12:05:29 -07:00
parent efe85ff4f5
commit a7606b8363
4 changed files with 12 additions and 5 deletions

View File

@ -98,7 +98,7 @@ You can also exit without saving by pressing \`Cmd + r\`.
### AI
#### How to Ask an LLM a Question
Asking a question is as simple as typing a message in the prompt and pressing enter. By default, we forward messages to the *gpt-3.5-turbo* model through our server.
Asking a question is as simple as typing a message in the prompt and pressing enter. By default, we forward messages to the *gpt-4o-mini* model through our server.
#### How To Change The Model
See *settings help* for more info on how to configure your model.

View File

@ -6,6 +6,7 @@ import { TypingIndicator } from "@/app/element/typingindicator";
import { WOS, atoms, fetchWaveFile, getUserName, globalStore } from "@/store/global";
import * as services from "@/store/services";
import { WshServer } from "@/store/wshserver";
import * as util from "@/util/util";
import * as jotai from "jotai";
import type { OverlayScrollbars } from "overlayscrollbars";
import { OverlayScrollbarsComponent, OverlayScrollbarsComponentRef } from "overlayscrollbars-react";
@ -104,10 +105,16 @@ export class WaveAiModel implements ViewModel {
}, 1500);
});
this.viewText = jotai.atom((get) => {
const settings = get(atoms.settingsAtom);
const isCloud = util.isBlank(settings?.["ai:apitoken"]) && util.isBlank(settings?.["ai:baseurl"]);
let modelText = "gpt-4o-mini";
if (!isCloud && !util.isBlank(settings?.["ai:model"])) {
modelText = settings["ai:model"];
}
const viewTextChildren: HeaderElem[] = [
{
elemtype: "text",
text: get(atoms.settingsAtom)["ai:model"] ?? "gpt-3.5-turbo",
text: modelText,
},
];
return viewTextChildren;
@ -174,7 +181,7 @@ export class WaveAiModel implements ViewModel {
opts: opts,
prompt: [...history, newPrompt],
};
const aiGen = WshServer.StreamWaveAiCommand(beMsg);
const aiGen = WshServer.StreamWaveAiCommand(beMsg, { timeout: 60000 });
let fullMsg = "";
for await (const msg of aiGen) {
fullMsg += msg.text ?? "";

View File

@ -82,7 +82,7 @@ func GetWSEndpoint() string {
}
const DefaultMaxTokens = 1000
const DefaultModel = "gpt-3.5-turbo"
const DefaultModel = "gpt-4o-mini"
const DefaultStreamChanSize = 10
const PCloudWSEndpoint = "wss://wsapi.waveterm.dev/"
const PCloudWSEndpointVarName = "PCLOUD_WS_ENDPOINT"

View File

@ -1,5 +1,5 @@
{
"ai:model": "gpt-3.5-turbo",
"ai:model": "gpt-4o-mini",
"ai:maxtokens": 1000,
"ai:timeoutms": 10000,
"autoupdate:enabled": true,