Skip to content

Commit

Permalink
Simplify FMPData integration notebook content.
Browse files Browse the repository at this point in the history
Refactored the FMPData integration notebook by removing redundant metadata and restructuring it to align with a more concise cell format. This enhances readability while maintaining functionality and documentation clarity.
  • Loading branch information
MehdiZare committed Jan 12, 2025
1 parent 97405f2 commit 6dc3922
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/docs/integrations/tools/fmp-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,14 @@
"toolkit = FMPDataToolkit()\n",
"\n",
"# Instantiation with specific query focus\n",
"market_toolkit = FMPDataToolkit(\n",
" query=\"Get stock market prices and technical indicators\",\n",
" num_results=5\n",
")\n",
"market_toolkit = FMPDataToolkit(query=\"Get stock market prices and technical indicators\",num_results=5)\n",
"\n",
"# Instantiation with custom configuration\n",
"custom_toolkit = FMPDataToolkit(\n",
" query=\"Financial analysis\",\n",
" num_results=3,\n",
" similarity_threshold=0.4,\n",
" cache_dir=\"/custom/cache/path\"\n",
" cache_dir=\"/custom/cache/path\",\n",
")"
],
"id": "615375140978a557"
Expand Down Expand Up @@ -152,14 +149,12 @@
"tool = FMPDataTool()\n",
"\n",
"# Basic query\n",
"result = tool.invoke({\n",
" \"query\": \"What's Apple's current stock price?\"\n",
"})\n",
"result = tool.invoke({\"query\": \"What's Apple's current stock price?\"})\n",
"\n",
"# Advanced query with specific format\n",
"detailed_result = tool.invoke({\n",
" \"query\": \"Compare Tesla and Ford's profit margins\",\n",
" \"response_format\": ResponseFormat.BOTH\n",
" \"response_format\": ResponseFormat.BOTH,\n",
"})"
]
},
Expand Down Expand Up @@ -189,9 +184,7 @@
"agent_executor = AgentExecutor(agent=agent, tools=tools)\n",
"\n",
"# Run query\n",
"response = agent_executor.invoke({\n",
" \"input\": \"What's the PE ratio of Microsoft?\"\n",
"})"
"response = agent_executor.invoke({\"input\": \"What's the PE ratio of Microsoft?\"})"
]
},
{
Expand Down Expand Up @@ -226,10 +219,9 @@
"4. Assessing growth metrics\n",
"\"\"\"\n",
"\n",
"response = advanced_tool.invoke({\n",
" \"query\": query,\n",
" \"response_format\": ResponseFormat.BOTH\n",
"})\n",
"response = advanced_tool.invoke(\n",
" {\"query\": query, \"response_format\": ResponseFormat.BOTH}\n",
")\n",
"\n",
"print(\"Detailed Financial Analysis:\")\n",
"print(response)"
Expand All @@ -243,6 +235,14 @@
"### FMPDataToolkit\n"
],
"id": "9b9dc04b8a68e94c"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"source": "",
"id": "4b6604b7cf72c1a0",
"execution_count": null
}
],
"metadata": {
Expand Down

0 comments on commit 6dc3922

Please sign in to comment.