Skip to content

Commit

Permalink
cherrypick
Browse files Browse the repository at this point in the history
  • Loading branch information
berkingurcan committed Jul 6, 2024
1 parent df4fa3b commit b15d71c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/api/demosearch/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { NextResponse } from 'next/server'
import { SEARCHER_PROMPT } from './prompt'
import { validateApiKey } from '@/lib/utils'
import { demoSearchRunnable } from '@/lib/tools'
import { demoSearchToolRunnable } from '@/lib/tools/demoSearch'

export const runtime = 'edge'

Expand Down Expand Up @@ -64,7 +63,7 @@ export async function POST(req: Request) {
})
}

model = 'gpt-4o'
model = 'gpt-4-turbo'
const openai = new OpenAI(configuration)

const runner = openai.beta.chat.completions.runTools({
Expand All @@ -81,7 +80,7 @@ export async function POST(req: Request) {
content: message
}
],
tools: [demoSearchToolRunnable(message)]
tools: demoSearchRunnable
})

const stream = OpenAIStream(runner)
Expand Down
1 change: 1 addition & 0 deletions lib/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ export const searchRunnable: RunnableToolFunction<any>[] = [
]

export const demoSearchRunnable: RunnableToolFunction<any>[] = [
demoSearchToolRunnable
]

0 comments on commit b15d71c

Please sign in to comment.