mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-21 15:44:19 +01:00
feat: search fix web search
This commit is contained in:
@@ -6,10 +6,10 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
|
||||
class GPT_3_5_Turbo:
|
||||
def __init__(self, system: str = ''):
|
||||
self.system = system
|
||||
def __init__(self, system_string: str = ''):
|
||||
self.system = system_string
|
||||
|
||||
def __call__(self, prompt: str) -> str:
|
||||
def __call__(self, prompt_string: str) -> str:
|
||||
response = openai.ChatCompletion.create(
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{
|
||||
@@ -17,7 +17,7 @@ class GPT_3_5_Turbo:
|
||||
"content": self.system
|
||||
}, {
|
||||
"role": 'user',
|
||||
"content": prompt
|
||||
"content": prompt_string
|
||||
}]
|
||||
)
|
||||
return response.choices[0]['message']['content']
|
||||
|
||||
Reference in New Issue
Block a user