yash-srivastava19 commited on
Commit
78f9f8d
·
verified ·
1 Parent(s): c822c2d

Update custom_llm.py

Browse files

update from legacy API to Chat API

Files changed (1) hide show
  1. custom_llm.py +1 -1
custom_llm.py CHANGED
@@ -17,7 +17,7 @@ class CustomLLM(LLM):
17
  if stop is not None:
18
  raise ValueError("stop kwargs are not permitted.")
19
 
20
- response = co.generate(model=self.model, prompt=f'{prompt}', max_tokens=1700, temperature=0.9)
21
  print(response.generations[0].text)
22
 
23
  return f' ```python \n {response.generations[0].text} \n ``` '
 
17
  if stop is not None:
18
  raise ValueError("stop kwargs are not permitted.")
19
 
20
+ response = co.chat(message=f'{prompt}', max_tokens=1700, temperature=0.9)
21
  print(response.generations[0].text)
22
 
23
  return f' ```python \n {response.generations[0].text} \n ``` '