79390683

Date: 2025-01-27 12:17:42
Score: 1
Natty:
Report link

If you want to use tools with your model, you need to use ChatOpenAI instead of OpenAI. Update your code as follows:

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(temperature=0, api_key=openai_api_key, model="gpt-4o-mini")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Cristóbal Bergillos Navarro