pylint: lint code format

This commit is contained in:
csunny 2023-08-23 17:02:54 +08:00
parent f1d548f24b
commit e058511b4e
3 changed files with 4 additions and 2 deletions

View File

@ -232,6 +232,7 @@ class GorillaAdapter(BaseLLMAdaper):
)
return model, tokenizer
class StarCoderAdapter(BaseLLMAdaper):
pass

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
def gpt4all_generate_stream(model, tokenizer, params, device, max_position_embeddings):
stop = params.get("stop", "###")
prompt = params["prompt"]
role, query = prompt.split(stop)[0].split(":")
print(f"gpt4all, role: {role}, query: {query}")
yield model.generate(prompt=query, streaming=True)

View File

@ -191,6 +191,7 @@ class GorillaChatAdapter(BaseChatAdpter):
return generate_stream
class GPT4AllChatAdapter(BaseChatAdpter):
def match(self, model_path: str):
return "gptj-6b" in model_path