-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
cloudflare[minor]: Add tool calling support #5820
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,101 @@ | |||
import { ChatCloudflareWorkersAI } from "@langchain/cloudflare"; |
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.
Hey there! I've reviewed the code and noticed that the recent changes explicitly access environment variables using process.env
. I've flagged this for your review to ensure that the handling of environment variables aligns with best practices. Let me know if you have any questions or need further assistance!
@@ -37,7 +37,8 @@ | |||
"dependencies": { |
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.
Hey there! 👋 I noticed that a new dependency "zod-to-json-schema" has been added and the existing "uuid" dependency has been updated in the "dependencies" section. This is flagged for your review to ensure it aligns with the project's dependency management strategy. Keep up the great work!
@@ -146,10 +249,10 @@ export class ChatCloudflareWorkersAI |
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.
Hey there! I noticed that this PR adds a new external HTTP request using the fetch
function. I've flagged this change for your review to ensure it aligns with the project's requirements. Let me know if you have any questions!
@@ -3,25 +3,109 @@ import { | |||
SimpleChatModel, |
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.
Hey team, I've reviewed the code and noticed that the recent changes in the PR are accessing the getEnvironmentVariable
function to retrieve an environment variable. This comment is to flag this change for your review. Let me know if you need further assistance with this.
@@ -1,4 +1,4 @@ | |||
import { Ai } from "@cloudflare/ai"; | |||
import { Ai } from "@cloudflare/ai/dist/ai.js"; |
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.
Por que?
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 was unable to run in examples
, or in a local project due to this error:
file:///Users/bracesproul/code/lang-chain-ai/wt/brace/cloudflare-tools/libs/langchain-cloudflare/dist/embeddings.js:2
import { Ai } from "@cloudflare/ai";
^^
SyntaxError: The requested module '@cloudflare/ai' does not provide an export named 'Ai'
When I switched the import path the error went away.
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.
awe shit, in triggering this error again to show you, it's now persisting even with that new path. Will try and fix
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.
That package is on the way out!
There is a TypeScript SDK now that wraps nicely...but also it's on the Binding env.AI.run
not sure how to do this.
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 have a PR up that uses the native binding: #5287
Closing: stale |
todo: docs