{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "961a0e18", "metadata": {}, "outputs": [], "source": [ "from agno.agent import Agent\n", "from agno.models.anthropic import Claude\n", "from agno.tools.reasoning import ReasoningTools\n", "from agno.tools.yfinance import YFinanceTools\n", "from agno.models.ollama import Ollama\n", "#步骤1 获取对应文件全部信息\n", "from openai import OpenAI\n", "from dotenv import load_dotenv \n", "import os\n", "import glob\n", "import json\n", "import pandas as pd\n", "client = OpenAI(base_url=os.getenv(\"BAILIAN_API_BASE_URL\"),\n", " api_key=os.getenv(\"BAILIAN_API_KEY\"))\n", "\n", "selected_model = Ollama(id=\"qwen2.5:32b\") # 🎯 通义千问 3-32B 模型 (本地运行)\n", "\n", "reasoning_agent = Agent(\n", " model=Ollama(id=\"qwen3-30b-a3b\"),\n", " tools=[\n", " ReasoningTools(add_instructions=True),\n", " YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True),\n", " ],\n", " instructions=\"Use tables to display data.\",\n", " markdown=True,\n", ")" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11.13" } }, "nbformat": 4, "nbformat_minor": 5 }