-
Notifications
You must be signed in to change notification settings - Fork 171
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
feat: add claude-3.5-sonnet to ai assistant in code editor #1855
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## qa #1855 +/- ##
=======================================
Coverage 90.92% 90.92%
=======================================
Files 208 208
Lines 43349 43349
=======================================
Hits 39415 39415
Misses 3934 3934 ☔ View full report in Codecov by Sentry. |
Added to Heroku staging, and production. It's worth noting that going forward all external APIs in every service should be optional for self hosting. If a user self-hosts and doesn't include an ANTHROPIC_API_KEY, it should be disabled in the app. Same with OPEN_AI and every other external service |
response.write(`data: ${JSON.stringify(chunk)}\n\n`); | ||
} | ||
|
||
response.write('[DONE]\n\n'); |
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.
Why write [done] to the stream?
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.
works without it, I think it was part of some old api
https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream
[consoleOutput, editorContent, schemaJsonForAi, selectedCell.x, selectedCell.y, mode] | ||
); | ||
|
||
const cellContext = useMemo<AIMessage>( |
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.
Is this sent with every message?
Should we also add the editor content in addition to the console output?
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.
ai chat api is stateless, entire prompt history, including even quadratic docs is sent in every api request
editor content is already being sent here
@@ -249,6 +235,20 @@ ${QuadraticDocs}`, | |||
<div id="ai-streaming-output-anchor" key="ai-streaming-output-anchor" /> | |||
</div> | |||
</div> | |||
|
|||
<div className="flex flex-col items-end gap-2 px-3 pb-2"> | |||
<select |
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.
use shadcn dropdown https://ui.shadcn.com/docs/components/dropdown-menu
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 looks great to me! Really feels like a solid improvement in the right direction for AI in Quadratic.
requires adding anthropic api key to deployment, in quadratic-api env variables