Skip to content

Commit

Permalink
Fix minor API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Nov 12, 2023
1 parent 06bf11b commit a0a064c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prompt_engineering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def generate_json_resume(cv_text, api_key, model="gpt-3.5-turbo"):
)

try:
answer = response["choices"][0]["message"]["content"]
answer = response.choices[0].message.content
answer = json.loads(answer)

if prompt == BASICS_PROMPT and "basics" not in answer:
Expand Down Expand Up @@ -224,7 +224,7 @@ def tailor_resume(cv_text, api_key, model="gpt-3.5-turbo"):
],
)

answer = response["choices"][0]["message"]["content"]
answer = response.choices[0].message.content
return answer
except Exception as e:
print(e)
Expand Down

0 comments on commit a0a064c

Please sign in to comment.