Using Groq model but getting error for OPENAI

Hi @MrJod17
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

Hey @MrJod17, can you please update phidata by running pip install -U phidata. We recently fixed this issue and shouldn’t give you this error anymore. I tested it just now.

Hi @manthanguptaa ,

I have the same problem while trying to use JSONKnowledgeBase or PDFKnowledgeBase with PgVector as described in the examples (JSON Knowledge Base - Phidata) but with Grog model

agent = Agent(
    model=Groq(id="llama-3.3-70b-versatile"),
    knowledge=knowledge_base,
    search_knowledge=True,
    show_tool_calls=True,
    markdown=True,
)

Error:

INFO     Reading: data/dataset/beer_data/beer_data/records.json                                                                        
ERROR    Error processing document 'records': Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check   
         your plan and billing details. For more information on this error, read the docs:                                             
         https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code':        
         'insufficient_quota'}}  

@andersenmp looks like you have run out of credits to run the agent example. You will have to purchase more credits on Groq.

Hi @manthanguptaa, I don’t think the issue is with groq, I can use it with my other agents without problem. My issue here is exactly the usage of openai for something I don’t know about it, even if I have explicit set groq for the model

Hey @andersenmp !

The error is due to a case mismatch. Changing Model to model in your Agent config should fix it, as the field name is case-sensitive.

The Agent does not have a Model parameter so it defaults to using OpenAI as the model. Hence, the error. Please let us know if you face any issues