langchain.llms.chatglm.ChatGLM¶
class langchain.llms.chatglm.ChatGLM[source]¶
Bases: LLM
ChatGLM LLM service.
Example
from langchain.llms import ChatGLM
endpoint_url = (
    "http://127.0.0.1:8000"
)
ChatGLM_llm = ChatGLM(
    endpoint_url=endpoint_url
)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param cache: Optional[bool] = None¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param endpoint_url: str = 'http://127.0.0.1:8000/'¶
Endpoint URL to use.
param history: List[List] = []¶
History of the conversation
param max_token: int = 20000¶
Max token allowed to pass to the model.
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model_kwargs: Optional[dict] = None¶
Key word arguments to pass to the model.
param tags: Optional[List[str]] = None¶
Tags to add to the run trace.
param temperature: float = 0.1¶
LLM model temperature from 0 to 10.
param top_p: float = 0.7¶
Top P for nucleus sampling from 0 to 1
param verbose: bool [Optional]¶
Whether to print out response text.
param with_history: bool = False¶
Whether to use history or not