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[patch]: Fix caution mdx content block bug in genai doc #6319

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 43 additions & 21 deletions docs/core_docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ yarn-error.log*

/.quarto/
# AUTO_GENERATED_DOCS
docs/tutorials/rag.md
docs/tutorials/rag.mdx
docs/tutorials/query_analysis.md
docs/tutorials/query_analysis.mdx
docs/tutorials/qa_chat_history.md
docs/tutorials/qa_chat_history.mdx
docs/tutorials/pdf_qa.md
docs/tutorials/pdf_qa.mdx
docs/tutorials/local_rag.md
docs/tutorials/local_rag.mdx
docs/tutorials/llm_chain.md
docs/tutorials/llm_chain.mdx
docs/tutorials/graph.md
docs/tutorials/graph.mdx
docs/tutorials/extraction.md
docs/tutorials/extraction.mdx
docs/tutorials/classification.md
docs/tutorials/classification.mdx
docs/tutorials/chatbot.md
docs/tutorials/chatbot.mdx
docs/how_to/trim_messages.md
docs/how_to/trim_messages.mdx
docs/how_to/tools_prompting.md
Expand Down Expand Up @@ -188,27 +208,29 @@ docs/how_to/assign.md
docs/how_to/assign.mdx
docs/how_to/agent_executor.md
docs/how_to/agent_executor.mdx
docs/tutorials/rag.md
docs/tutorials/rag.mdx
docs/tutorials/query_analysis.md
docs/tutorials/query_analysis.mdx
docs/tutorials/qa_chat_history.md
docs/tutorials/qa_chat_history.mdx
docs/tutorials/pdf_qa.md
docs/tutorials/pdf_qa.mdx
docs/tutorials/local_rag.md
docs/tutorials/local_rag.mdx
docs/tutorials/llm_chain.md
docs/tutorials/llm_chain.mdx
docs/tutorials/graph.md
docs/tutorials/graph.mdx
docs/tutorials/extraction.md
docs/tutorials/extraction.mdx
docs/tutorials/classification.md
docs/tutorials/classification.mdx
docs/tutorials/chatbot.md
docs/tutorials/chatbot.mdx
docs/integrations/llms/mistral.md
docs/integrations/llms/mistral.mdx
docs/integrations/chat/togetherai.md
docs/integrations/chat/togetherai.mdx
docs/integrations/chat/openai.md
docs/integrations/chat/openai.mdx
docs/integrations/chat/ollama.md
docs/integrations/chat/ollama.mdx
docs/integrations/chat/mistral.md
docs/integrations/chat/mistral.mdx
docs/integrations/chat/mistral.mdx
docs/integrations/chat/groq.md
docs/integrations/chat/groq.mdx
docs/integrations/chat/google_vertex_ai.md
docs/integrations/chat/google_vertex_ai.mdx
docs/integrations/chat/google_generativeai.md
docs/integrations/chat/google_generativeai.mdx
docs/integrations/chat/fireworks.md
docs/integrations/chat/fireworks.mdx
docs/integrations/chat/cohere.md
docs/integrations/chat/cohere.mdx
docs/integrations/chat/azure.md
docs/integrations/chat/azure.mdx
docs/integrations/chat/anthropic.md
docs/integrations/chat/anthropic.mdx
docs/integrations/document_loaders/web_loaders/web_cheerio.md
docs/integrations/document_loaders/web_loaders/web_cheerio.mdx
16 changes: 6 additions & 10 deletions docs/core_docs/docs/integrations/chat/google_generativeai.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -326,23 +326,19 @@
"```{=mdx}\n",
"\n",
":::caution\n",
"\n",
"The Google GenerativeAI API does not allow tool schemas to contain an object with unknown properties.\n",
"\n",
"For example, the following Zod schema will throw an error:\n",
"For example, the following Zod schemas will throw an error:\n",
"\n",
"```typescript\n",
"const schema = z.object({\n",
" properties: z.record(z.unknown()), // Not allowed\n",
"});\n",
"```\n",
"`const invalidSchema = z.object({ properties: z.record(z.unknown()) });`\n",
"\n",
"or\n",
"and\n",
"\n",
"```typescript\n",
"const schema = z.record(z.unknown()); // Not allowed\n",
"```\n",
"`const invalidSchema2 = z.record(z.unknown());`\n",
"\n",
"Instead, you should explicitly define the properties of the object field.\n",
"\n",
":::\n",
"\n",
"```\n"
Expand Down
Loading