-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
docs: Resolves #7483, resolves #7274 #7505
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
Thanks for this! A few small nits
import { Calculator } from "@langchain/community/tools/calculator"; | ||
import { | ||
GoogleCalendarCreateTool, | ||
GoogleCalendarViewTool, | ||
} from "@langchain/community/tools/google_calendar"; | ||
import { ChatPromptTemplate } from "@langchain/core/prompts"; | ||
|
||
export async function run() { | ||
const model = new OpenAI({ |
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.
Let's use ChatOpenAI
with model: "gpt-4o-mini"
for everything, OpenAI
completions models are deprecated
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.
done. Cuz ChatOpenAI
inherits BaseChatModel
, not BaseLLM
, I also update google_calendar type definitions.
apiKey: process.env.OPENAI_API_KEY, | ||
}); | ||
const prompt: ChatPromptTemplate = await pull("hwchase17/openai-tools-agent"); | ||
const calendarAgent = await createOpenAIToolsAgent({ |
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.
Prefer createReactAgent
from @langchain/langgraph
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.
done. import { createReactAgent } from "@langchain/langgraph"
ask users to install an extra package not mentioned in google_calendar.mdx
, I use createReactAgent
from @langchain/agents
instead.
Resolves #7483 , resolves #7274
update /docs/integrations/tools/google_calendar/