-
Notifications
You must be signed in to change notification settings - Fork 3
fix: extraction model + prompt tuning + seed format #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,11 +12,11 @@ export class OpenAIService { | |
| apiKey: process.env.OPENAI_API_KEY, | ||
| }); | ||
|
|
||
| generateText = (text: string, userId: string, instructions?: string) => { | ||
| generateText = (text: string, userId: string, instructions?: string, model?: string) => { | ||
| return this.openai.responses | ||
| .create({ | ||
| model: GPT_MODEL, | ||
| tools: [{ type: 'web_search_preview' }], | ||
| model: model || GPT_MODEL, | ||
| ...(model ? {} : { tools: [{ type: 'web_search_preview' }] }), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might break the tool calling.. Why did Claude do this? Nano doesn't have tool calling or something?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right — gpt-4.1-nano doesn't support web_search_preview. It throws an error if you pass tools to it. The conditional skips tools when a custom model is passed (extraction/selection via nano), but keeps them for the default path (GPT-5.2 responses). Extraction and selection don't need web search anyway — they're analyzing conversation text that's already in the prompt. |
||
| instructions: instructions, | ||
| input: text, | ||
| user: `${userId}-DaBros2016`, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this just make the model have a default param. IE:
model = GPT_MODELin the function paramsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can always pass
modelhere and it'll either be the default when the caller doesn't pass one in, or it'll be whatever they passed in. Slightly more clean (this is kinda becoming a nit though because we might get rid of this class entirely in the near future if @bajman EVER GETS IT TOGETHER COUGH COUGH AHEM)