mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-17 15:58:25 +00:00
pylint: lint code format
This commit is contained in:
parent
f1d548f24b
commit
e058511b4e
@ -232,6 +232,7 @@ class GorillaAdapter(BaseLLMAdaper):
|
||||
)
|
||||
return model, tokenizer
|
||||
|
||||
|
||||
class StarCoderAdapter(BaseLLMAdaper):
|
||||
pass
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user