Skip to content

Commit

Permalink
add back altman
Browse files Browse the repository at this point in the history
  • Loading branch information
vaughanlove committed Nov 17, 2023
1 parent c514395 commit 4227b4a
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,21 @@ def generate_paragraphs(requirements: List[str], resume_documents: List[str], mo
# rerank_hits.reverse()
input_credentials = ("\n - ").join(rerank_results)

response = co.summarize(
text=input_credentials,
format="paragraph",
temperature=0.96,
length='long',
model='command-nightly',
extractiveness='auto',
additional_command='Generate a summary of the first person credentials being provided. The summary should maintain the first-person prose. Remove all open-ended questions and placeholder tokens like [company name] or [first name] as examples.'
)
# print(response)
return {'para_A' : response.summary, 'para_B' : 'result.data[1]'}
if model == 'altman':
result = co.generate(model='e1f1b8c8-f87a-4fd3-9346-99068e5b7036-ft', prompt=para_one_prompt, k=25, temperature=0.96, frequency_penalty=0.2, num_generations=1)
return {'para_A' : result.data[0], 'para_B' : 'result.data[1]'}

else:
response = co.summarize(
text=input_credentials,
format="paragraph",
temperature=0.96,
length='long',
model='command-nightly',
extractiveness='auto',
additional_command='Generate a summary of the first person credentials being provided. The summary should maintain the first-person prose. Remove all open-ended questions and placeholder tokens like [company name] or [first name] as examples.'
)
return {'para_A' : response.summary, 'para_B' : 'result.data[1]'}

return {'para_A' : "something broke", 'para_B' : 'result.data[1]'}

0 comments on commit 4227b4a

Please sign in to comment.