MCPcopy
hub / github.com/zai-org/ChatGLM3 / generate_chatglm3

Function generate_chatglm3

openai_api_demo/utils.py:164–167  ·  view source on GitHub ↗
(model: PreTrainedModel, tokenizer: PreTrainedTokenizer, params: dict)

Source from the content-addressed store, hash-verified

162
163
164def generate_chatglm3(model: PreTrainedModel, tokenizer: PreTrainedTokenizer, params: dict):
165 for response in generate_stream_chatglm3(model, tokenizer, params):
166 pass
167 return response
168
169
170def apply_stopping_strings(reply, stop_strings) -> Tuple[str, bool]:

Callers 1

create_chat_completionFunction · 0.90

Calls 1

generate_stream_chatglm3Function · 0.70

Tested by

no test coverage detected