Skip to content

Forum in maintenance, we will back soon 🙂

Error Code With Sim...
 
Notifications
Clear all

Error Code With Simple LLM

4 Posts
3 Users
6 Reactions
81 Views
(@reallionaire)
Posts: 2
Active Member
Topic starter
 

I'm having issues with the simple LLM repository after importing into Visual Studio. The code generates the error in the terminal; "An error occurred: LLM.create() got an unexpected keyword argument 'api_key'". The other parts of the code seem fine and I have added my api key in (.env) but no output. Any fix please? I am entirely new to coding and have taken the python scripting course.

This topic was modified 3 months ago by Reallion
 
Posted : 07/08/2024 8:51 pm
MD jahid reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@reallionaire without giving your API Key what is the syntax you used to set the API key in the .env file?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 07/09/2024 2:38 pm
Reallion reacted
(@husein)
Posts: 484
Member Moderator
 

@reallionaire Make sure that you set your API key in the .env file this way:

OPENAI_API_KEY = "YOUR_KEY"
 
Posted : 07/09/2024 5:02 pm
Reallion reacted
(@reallionaire)
Posts: 2
Active Member
Topic starter
 

Thank you, it's fixed now. I did some troubleshooting and discovered my directory was not properly set.

 
Posted : 07/09/2024 6:44 pm
Share: