Merge pull request #109 from vyomakesh09/patch-2

Update zephyr.py

Former-commit-id: fdcc6cb2d93974d7974a88d120084e10ee6bf619
pull/160/head
Eternal Reclaimer 1 year ago committed by GitHub
commit d39b5c0608

@ -55,7 +55,7 @@ class Zephyr:
self.messages = [ self.messages = [
{ {
"role": "system", "role": "system",
"content": f"{self.systen_prompt}\n\nUser:", "content": f"{self.system_prompt}\n\nUser:",
}, },
{ {
"role": "user", "role": "user",
@ -71,8 +71,8 @@ class Zephyr:
add_generation_prompt=self.add_generation_prompt, add_generation_prompt=self.add_generation_prompt,
) )
outputs = self.pipe(prompt) # max_new_token=self.max_new_tokens) outputs = self.pipe(prompt) # max_new_token=self.max_new_tokens)
print(outputs[0])["generated_text"] print(outputs[0]["generated_text"])
def chat(self, message: str): def chat(self, message: str):
""" """
Adds a user message to the conversation and generates a chatbot response. Adds a user message to the conversation and generates a chatbot response.

Loading…
Cancel
Save