Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ucev
Copy link
Contributor

@ucev ucev commented Jan 11, 2025

Resolves #7483 , resolves #7274
update /docs/integrations/tools/google_calendar/

Copy link

vercel bot commented Jan 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jan 12, 2025 3:59am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Jan 12, 2025 3:59am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Jan 11, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 11, 2025
@ucev ucev changed the title close: Closes #7483 resolves: Resolves #7483, resolves #7274 Jan 11, 2025
Copy link
Collaborator

@jacoblee93 jacoblee93 left a 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({
Copy link
Collaborator

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

Copy link
Contributor Author

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({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@ucev ucev Jan 12, 2025

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.

@ucev ucev changed the title resolves: Resolves #7483, resolves #7274 docs: Resolves #7483, resolves #7274 Jan 12, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
2 participants