-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
chore: implement an Unleash AI service #8408
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Dependency ReviewThe following issues were found:
OpenSSF ScorecardScorecard details
Scanned Manifest Filespackage.json
|
5d24da9
to
93d4bd1
Compare
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.
Yeah looks cool!
); | ||
|
||
return response; | ||
} catch (error) { |
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.
What's the try/catch here for? Debugging?
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.
Anything can go wrong when calling this method, so this allows us to forward either the success response or the error message back to the assistant, allowing it to handle both scenarios gracefully.
} | ||
|
||
chat( | ||
messages: ChatCompletionMessageParam[], |
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.
What's the intent here? Does the chat history live on the UI at the moment? Can't quite see how this works behind a load balancer
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.
We're still on the early stage of this project where we're mostly just migrating code from the hackathon branch and polishing it a bit. So for now the chat history still lives in the UI. We have another task for later that moves this ownership to the server.
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.
In the same vein, I'm pretty sure our toggle-flag
tool is not respecting change requests currently, which is another task we have for later.
featureSearchService, | ||
user, | ||
}: searchFlagOperationalParams): RunnableToolFunctionWithParse<searchFlagParams> => ({ | ||
type: 'function', |
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.
This is pretty cool! How well does this work in practice? Does OpenAI use all of these terms effectively?
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.
In general, based on the hackathon, this worked pretty well, so it should! We can always fine tune if needed.
If we're specifically talking about this search-flag
tool I'm not sure because I haven't tried it yet 😄 It's a new tool to replace the old get-flag
one. Good news is that we'll find out soon enough whether this works like we expect it to!
}, | ||
enabled: { | ||
type: 'boolean', | ||
description: 'The desired enabled status of the flag', |
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.
Maybe your intent is to tackle this in the base prompt but I can see this causing confusion with constraints forcing a flag off
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.
I'm not sure I follow 🤔 If a flag is off because of constraints, that doesn't matter in the perspective of our assistant, because it's only concerned about the admin side of Unleash, right?
I'm curious to know what you have in mind.
Closing this in favor of a refined approach based on internal discussion. |
https://linear.app/unleash/issue/2-2789/create-an-ai-service
Implements an Unleash AI service with 3 tools:
Depends on #8400