https://github.com/PJarbas/llms-ai-agents
AI Agents using Openai LLM
https://github.com/PJarbas/llms-ai-agents
agent langchain llms openai wolfram-alpha
Last synced: 9 months ago
JSON representation
AI Agents using Openai LLM
- Host: GitHub
- URL: https://github.com/PJarbas/llms-ai-agents
- Owner: PJarbas
- License: mit
- Created: 2024-08-28T16:17:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T11:24:37.000Z (over 1 year ago)
- Last Synced: 2024-12-09T16:11:45.299Z (over 1 year ago)
- Topics: agent, langchain, llms, openai, wolfram-alpha
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- License: LICENSE
Awesome Lists containing this project
README
# ai-math-agent
AI Agent using Openai LLM and Wolfram Alpha tool to solve math problems
```bash
> Entering new AgentExecutor chain...
To find the derivative of \(\cos(x)\), I need to use calculus rules. Specifically, I will use the standard derivative rule for trigonometric functions.
Action: wolfram_alpha
Action Input: derivative of cos(x)Assumption: d/dx(cos(x)) = -sin(x)
Answer: d/dx(cos(x)) = -sin(x)I now know the final answer.
Final Answer: The derivative of \(\cos(x)\) is \(-\sin(x)\).
> Finished chain.
{'input': 'What is the derivative of cos(x)', 'output': 'The derivative of \\(\\cos(x)\\) is \\(-\\sin(x)\\).', 'intermediate_steps': [(AgentAction(tool='wolfram_alpha', tool_input='derivative of cos(x)', log='To find the derivative of \\(\\cos(x)\\), I need to use calculus rules. Specifically, I will use the standard derivative rule for trigonometric functions.\n\nAction: wolfram_alpha\nAction Input: derivative of cos(x)'), 'Assumption: d/dx(cos(x)) = -sin(x) \nAnswer: d/dx(cos(x)) = -sin(x)')]}
```