syndisco.OpenAIModel
- class OpenAIModel(model_name: str, api_key: str, base_url: str, name: str, max_out_tokens: int, temperature: float = 0.0, remove_string_list: list[str] | None = None)
Bases:
BaseModelOpenAI API-compatible model wrapper.
Supports OpenAI API and compatible endpoints.
- get_name() str
Get the model’s assigned pseudoname.
- Returns:
The name of the model.
- Return type:
str
- prompt(system_prompt: str, user_prompt: str) str
Generate the model’s response based on a prompt.
- Parameters:
system_prompt (str) – The system prompt.
user_prompt (str) – The user prompt.
stop_words (list[str]) – Strings to be removed after generation.
- Returns:
the model’s response
- Return type:
str