-
Notifications
You must be signed in to change notification settings - Fork 59
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
Example of Query understanding. #83
Conversation
|
examples/query_expansions/run.ts
Outdated
|
||
const ExtractionValuesSchema = z.object({ | ||
rewrittenQuery: z.string().describe("Rewrite the query to be specific to the context. This will be used to do semantic search, so make sure it is specific to the context."), | ||
questionType: z.array(z.string().describe("The type of question that is being asked. This will be used to determine the type of answer that is expected. MUST be one of the following: PERSONAL_DATA, INTERNET, TRANSCRIPTS")), |
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.
could use a .enum(["PERSONAL_DATA", ...]) here?
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.
enum does not work while streaming
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.
hmm - why not? its just being set on the json schema right? Feel like I have had better accuracy defining enums - although I have 0 actual data to back up that claim lol
Deploying instructor-js with Cloudflare Pages
|
fixed!