mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-03 05:03:12 +08:00
增加call_行为
This commit is contained in:
parent
c4ee36b8ac
commit
25e5ab1282
@ -39,7 +39,14 @@ class ChatGLM(BaseAnswer, LLM, ABC):
|
||||
self.history_len = history_len
|
||||
|
||||
def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
|
||||
pass
|
||||
response, _ = self.checkPoint.model.chat(
|
||||
self.checkPoint.tokenizer,
|
||||
prompt,
|
||||
history=[],
|
||||
max_length=self.max_token,
|
||||
temperature=self.temperature
|
||||
)
|
||||
return response
|
||||
|
||||
def generatorAnswer(self, prompt: str,
|
||||
history: List[List[str]] = [],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user