0% found this document useful (0 votes)
4 views1 page

Pyton OpenAI

The document contains a Python script that utilizes the OpenAI API to generate responses based on user input. It prompts the user for a question and uses the GPT-3.5-turbo-instruct model to generate a completion. The script has some syntax errors and incorrect method calls that need to be addressed for proper functionality.

Uploaded by

ishmaelmlambo030
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Pyton OpenAI

The document contains a Python script that utilizes the OpenAI API to generate responses based on user input. It prompts the user for a question and uses the GPT-3.5-turbo-instruct model to generate a completion. The script has some syntax errors and incorrect method calls that need to be addressed for proper functionality.

Uploaded by

ishmaelmlambo030
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

...Application1\PythonApplication1\PythonApplication1.

py 1
1 from http import client
2 from [Link] import QUESTION
3 from urllib import response
4 from venv import create
5 from openai import OpenAI
6 from [Link] import Query
7 client =OpenAI(api_key="")
8 while True:
9 Query = input("Write you question")
10 response=[Link],create(
11 model="gpt-3.5-turbo-instruct" ,
12 prompt=Query ,
13 max_token = 50)
14 data=[Link][0].test
15
16 print ("data")

You might also like