You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: auth4genai/snippets/get-started/langchain-fastapi-py/async-auth.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,10 +253,11 @@ tools = [shop_online]
253
253
254
254
llm = ChatOpenAI(model="gpt-4.1-mini")
255
255
256
+
# ... existing code
256
257
agent = create_react_agent(
257
258
llm,
258
259
tools=ToolNode(tools, handle_tool_errors=False),
259
-
prompt="You are a personal assistant named Assistant0. You are a helpful assistant that can answer questions and help with tasks. You have access to a set of tools, use the tools as needed to answer the user's question. Render the email body as a markdown block, do not wrap it in code blocks.",
Copy file name to clipboardExpand all lines: auth4genai/snippets/get-started/langchain-fastapi-py/auth-for-rag.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,10 +169,11 @@ tools = [get_context_docs]
169
169
170
170
llm = ChatOpenAI(model="gpt-4.1-mini")
171
171
172
+
# ... existing code
172
173
agent = create_react_agent(
173
174
llm,
174
175
tools=ToolNode(tools, handle_tool_errors=False),
175
-
prompt="You are a personal assistant named Assistant0. You are a helpful assistant that can answer questions and help with tasks. You have access to a set of tools, use the tools as needed to answer the user's question. Render the email body as a markdown block, do not wrap it in code blocks.",
prompt="You are a personal assistant named Assistant0. You are a helpful assistant that can answer questions and help with tasks. You have access to a set of tools, use the tools as needed to answer the user's question. Render the email body as a markdown block, do not wrap it in code blocks.",
Copy file name to clipboardExpand all lines: auth4genai/snippets/get-started/langchain-fastapi-py/call-your-api.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,10 +151,11 @@ tools = [get_user_info]
151
151
152
152
llm = ChatOpenAI(model="gpt-4.1-mini")
153
153
154
+
# ... existing code
154
155
agent = create_react_agent(
155
156
llm,
156
157
tools=ToolNode(tools, handle_tool_errors=False),
157
-
prompt="You are a personal assistant named Assistant0. You are a helpful assistant that can answer questions and help with tasks. You have access to a set of tools, use the tools as needed to answer the user's question. Render the email body as a markdown block, do not wrap it in code blocks.",
Once the user is authenticated, you can fetch an access token from the Token Vault using the Auth0 AI SDK. In this example, we fetch an access token for a Google social connection. Once you've obtained the access token for a social connection, you can use it with an AI agent to fetch data during a tool call and provide contextual data in its response.
90
90
91
-
In our example, we create a file at `src/lib/tools/google-calendar.ts`. In the file, we define a tool, `checkUsersCalendarTool`, that uses the access token with the Google Calendar API to query for calendar events in a specified date range:
91
+
In our example, we create a file at `src/lib/tools/google-calendar.ts`. In the file, we define a tool, `getCalendarEventsTool`, that uses the access token with the Google Calendar API to query for calendar events in a specified date:
0 commit comments