as-cle-bert commited on
Commit
55bb721
1 Parent(s): 0f227dc

Update ChatCohere.py

Browse files
Files changed (1) hide show
  1. ChatCohere.py +4 -3
ChatCohere.py CHANGED
@@ -22,10 +22,11 @@ def card_completion(message: str) -> str:
22
  return response.message.content[0].text
23
 
24
  def summarize(message, system_prompt="You are an helpful assistant whose job is to summarize the text you are given in less than 900 charachters (including spaces) in such a way that it would constitute an effective and engaging description of a pokemon card package"):
25
- response = chat_completion(
26
- message_history=[
 
27
  {"role": "system", "content": system_prompt},
28
  {"role": "user", "content": message},
29
  ]
30
  )
31
- return response
 
22
  return response.message.content[0].text
23
 
24
  def summarize(message, system_prompt="You are an helpful assistant whose job is to summarize the text you are given in less than 900 charachters (including spaces) in such a way that it would constitute an effective and engaging description of a pokemon card package"):
25
+ response = co.chat(
26
+ model="command-r-plus-08-2024",
27
+ messages=[
28
  {"role": "system", "content": system_prompt},
29
  {"role": "user", "content": message},
30
  ]
31
  )
32
+ return response.message.content[0].text