nlztrk commited on
Commit
9d4a4de
1 Parent(s): 31c4737

Changed to old model

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -23,26 +23,23 @@ class OpenAI_API:
23
  def __init__(self):
24
  self.openai_api_key = ''
25
 
26
- def single_request(self, address_text):
27
 
28
  openai.api_type = "azure"
29
  openai.api_base = "https://damlaopenai.openai.azure.com/"
30
  openai.api_version = "2022-12-01"
31
  openai.api_key = os.getenv("API_KEY")
32
-
33
  response = openai.Completion.create(
34
- engine="Davinci-003",
35
- prompt=address_text,
36
- temperature=0.9,
37
- max_tokens=256,
38
- top_p=1.0,
39
- n=1,
40
- logprobs=0,
41
- echo=False,
42
- stop=None,
43
- frequency_penalty=0,
44
- presence_penalty=0,
45
- best_of=1)
46
 
47
  return response
48
 
 
23
  def __init__(self):
24
  self.openai_api_key = ''
25
 
26
+ def single_request(self, prompt_input):
27
 
28
  openai.api_type = "azure"
29
  openai.api_base = "https://damlaopenai.openai.azure.com/"
30
  openai.api_version = "2022-12-01"
31
  openai.api_key = os.getenv("API_KEY")
32
+
33
  response = openai.Completion.create(
34
+ model="text-davinci-003",
35
+ prompt=prompt_input,
36
+ temperature=0,
37
+ max_tokens=300,
38
+ top_p=1,
39
+ frequency_penalty=0.0,
40
+ presence_penalty=0.0,
41
+ stop=["\n"],
42
+ )
 
 
 
43
 
44
  return response
45