Skip to content

Commit

Permalink
fix try
Browse files Browse the repository at this point in the history
  • Loading branch information
berkingurcan committed Jul 3, 2024
1 parent 0e11b7a commit 21dc3be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/api/demosearch/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function POST(req: Request) {
})
}

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

const runner = openai.beta.chat.completions.runTools({
Expand Down
4 changes: 2 additions & 2 deletions lib/tools/demoSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function formatResults(matches: ScoredPineconeRecord[]) {
return results.join('\n')
}

const runTool = (message_content: string) => async (args: { query: string }): Promise<string> => {
export const runTool = (message_content: string) => async (args: { query: string }): Promise<string> => {
try {
const embeddings = await getEmbeddings(message_content)
const matches = await getMatchesFromEmbeddings(embeddings, 15, VECTOR_TYPE)
Expand Down Expand Up @@ -101,4 +101,4 @@ export const demoSearchToolRunnable = (message: string): RunnableToolFunction<{
properties: {}
}
}
})
})
4 changes: 2 additions & 2 deletions lib/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ export const searchRunnable: RunnableToolFunction<any>[] = [
searchToolRunnable
]

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

0 comments on commit 21dc3be

Please sign in to comment.