Forum in maintenance, we will back soon 🙂
AttributeError: module 'llm' has no attribute 'llm_generate_text'
Hi, got error in script LLMs:OpenAI,NlpCloud,Cohere
main.py script points to llm.py
line 18, in <module>
open_ai_response = llm.llm_generate_text(prompt, "OpenAI", "gpt-3.5-turbo")
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'llm' has no attribute 'llm_generate_text'
main.py
open_ai_response = llm.llm_generate_text(prompt, "OpenAI", "gpt-3.5-turbo")
print(open_ai_response)
llm.py
def llm_generate_text(prompt,service,model):
if service == 'OpenAI':
generated_text = openai_generate(prompt,model)
Please share a screenshot. and you are a power member; please use the premium forum to get better and faster responses. also yo can join our private discord server
@vjanrikard can you please share your code preferably via a public Github link or using the (<>) code icon above.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
All good after got access to repository case closed.
the “hasattr()” function inside the if-else to add logic to our code snippet. This will avoid the AttributeError
@google-md-hasanmasrur what code are you referring to? Do you have an example you can share?
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack