Skip to content

Commit e0d9657

Browse files
committed
update gpt4 and gpt4o openai commands
1 parent 47489f3 commit e0d9657

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/modules/llms/openaiBot.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export class OpenAIBot extends LlmsBase {
123123
ctx.hasCommand([
124124
SupportedCommands.chat,
125125
SupportedCommands.ask,
126-
SupportedCommands.gpt4,
127126
SupportedCommands.gpt,
128127
SupportedCommands.gpto
129128
]) ||
@@ -149,8 +148,8 @@ export class OpenAIBot extends LlmsBase {
149148
(ctx.message?.text?.startsWith('new ') && ctx.chat?.type === 'private') && this.checkModel(ctx))
150149
) {
151150
await this.onStop(ctx)
152-
this.updateSessionModel(ctx, LlmsModelsEnum.GPT_4)
153-
await this.onChat(ctx, LlmsModelsEnum.GPT_4, true, false)
151+
this.updateSessionModel(ctx, LlmsModelsEnum.GPT_4O)
152+
await this.onChat(ctx, LlmsModelsEnum.GPT_4O, true, false)
154153
return
155154
}
156155

@@ -160,6 +159,12 @@ export class OpenAIBot extends LlmsBase {
160159
return
161160
}
162161

162+
if (ctx.hasCommand(SupportedCommands.gpt4)) {
163+
this.updateSessionModel(ctx, LlmsModelsEnum.GPT_4)
164+
await this.onChat(ctx, LlmsModelsEnum.GPT_4, true, false)
165+
return
166+
}
167+
163168
if (ctx.hasCommand(SupportedCommands.ask32)) {
164169
this.updateSessionModel(ctx, LlmsModelsEnum.GPT_4_32K)
165170
await this.onChat(ctx, LlmsModelsEnum.GPT_4_32K, true, false)

src/modules/subagents/llamaSubagent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class LlamaAgent extends SubagentBase {
6565
await Promise.all(urls.map(async url => {
6666
let collection = ctx.session.collections.activeCollections.find(c => c.url === url)
6767
if (!collection) {
68-
await this.addUrlToCollection(ctx, ctx.chat?.id, url, msg.content as string)
68+
await this.addUrlToCollection(ctx, ctx.chat?.id ?? 0, url, msg.content as string)
6969
if (!ctx.session.collections.isProcessingQueue) {
7070
ctx.session.collections.isProcessingQueue = true
7171
await this.onCheckCollectionStatus(ctx)

0 commit comments

Comments
 (0)