Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Getting an Error:
Build Chat Applications with OpenAI and LangChain
https://learn.365datascience.com/courses/preview/build-chat-applications-with-openai-and-langchain/
I set up the .env file that contains the ‘OpenAI’ API key
04 The OpenAI API 03.ipynb
https://learn.365datascience.com/courses/preview/build-chat-applications-with-openai-and-langchain/
I set up the .env file that contains the ‘OpenAI’ API key
04 The OpenAI API 03.ipynb
Build Chat Applications with OpenAI and LangChain
completion = client.chat.completions.create(model = 'gpt-4',
messages = [{'role':'system',
'content':''' You are Marv, a chatbot that reluctantly
answers questions with sarcastic responses. '''},
{'role':'user',
'content':''' I've recently adopted a dog.
Could you suggest some dog names? '''}])
completion = client.chat.completions.create(model = 'gpt-4',
messages = [{'role':'system',
'content':''' You are Marv, a chatbot that reluctantly
answers questions with sarcastic responses. '''},
{'role':'user',
'content':''' I've recently adopted a dog.
Could you suggest some dog names? '''}])
OpenAI & LangchainOpenAI & Langchain
8 answers ( 0 marked as helpful)
Hey Frederick,
Thank you for reaching out!
Could you please provide a screenshot of your code and the error you are getting?
Kind regards,
365 Hristina
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Hey again Frederick,
Have you ensured that you OpenAI API key is set up correctly? Do you have your API key displayed upon executing the command below?
openai.api_key
If you can see your API key, could you please screenshot the rest of the error message?Thank you!
Kind regards,
365 Hristina
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Thank you for all of your help.
I will start at the begining starting with #3 Setting up the environment again.
Setting the API Key as the environmental variable
Clicked on the "Resources" button resulted in:
File not found
Done
Is this the result that I should be getting?
Hey again Frederick,
There indeed seems to be an issue with the resource files - we apologize for the inconvenience and are trying to solve it as quickly as possible. You can still access the Resources thorugh the following button:
This will download all course resources in a zip file. You can find the one you're searchig for in the following directory:
Section 3\3_Setting the API Key as an Environment Variable\Course notes\03 Setting Up the Env 03.ipynb
Hope this helps and do let me know if you experience other issues.
Kind regards,
365 Hristina
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Thanks again for your help.
I've been having trouble adding images.
What are the formats used.
I know how to use 'print screen' with Microsoft Word is there a way to do this. I am finding that converting from a .pdf to .jpg costs extra money for the converter.
Does 365 have a list of free ways to add images?
The issue you may be experiencing is that currently, the question field in the Q&A section doesn't support copy-pasting an image. What you need to do is save the image you want to attach locally (on your Desktop, for example) and attach it via the following button:
Let me know if I've misunderstood your question and if you experience further issues.
Kind regards,
365 Hristina
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
I will try that next time I get an error. I will perform a 'print screen' and save it in a Microsoft Word.docx to my desktop.
I was able to save a printscreen image to both a .docx and .pdf files than clicked on the add image icon but this action does no pick up either the .docx or .pdf file image types.