tensorgirl commited on
Commit
c8ad4b9
·
verified ·
1 Parent(s): f520f6e

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -115,9 +115,11 @@ def summary(input_json):
115
  completion = client.chat.completions.create(
116
  model="gpt-4o",
117
  messages=[
118
- {"role": "system", "content": "You are a financial expert. Help the client with summarizing the financial newsletter"},
119
  {"role": "user", "content": "{} {}".format(promptLong[id], long_text)}
120
- ]
 
 
121
  )
122
 
123
  output['Long summary'] = completion.choices[0].message
 
115
  completion = client.chat.completions.create(
116
  model="gpt-4o",
117
  messages=[
118
+ {"role": "system", "content": "You are a financial expert. Help the client with summarizing the financial newsletter. Write the summary in max 500 words"},
119
  {"role": "user", "content": "{} {}".format(promptLong[id], long_text)}
120
+ ],
121
+ temperature=0,
122
+ max_tokens=2000,
123
  )
124
 
125
  output['Long summary'] = completion.choices[0].message