OnnxGenAIChatCompletion Class
OnnxGenAI text completion service.
Note: This class is marked as 'experimental' and may change in the future.
Initializes a new instance of the OnnxGenAITextCompletion class.
Constructor
OnnxGenAIChatCompletion(template: ONNXTemplate, ai_model_path: str | None = None, ai_model_id: str | None = None, env_file_path: str | None = None, env_file_encoding: str | None = None, *, model: Any, tokenizer: Any, tokenizer_stream: Any, enable_multi_modality: bool = False, service_id: str = '', instruction_role: str = None)
Parameters
Name | Description |
---|---|
template
Required
|
The chat template configuration. |
ai_model_path
|
Local path to the ONNX model Folder. Default value: None
|
ai_model_id
|
The ID of the AI model. Defaults to None. Default value: None
|
env_file_path
|
Use the environment settings file as a fallback to environment variables. Default value: None
|
env_file_encoding
|
The encoding of the environment settings file. Default value: None
|
kwargs
Required
|
Additional arguments. |
Keyword-Only Parameters
Name | Description |
---|---|
model
Required
|
|
tokenizer
Required
|
|
tokenizer_stream
Required
|
|
enable_multi_modality
Required
|
|
service_id
Required
|
|
instruction_role
Required
|
|
Methods
get_prompt_execution_settings_class |
Create a request settings object. |
get_prompt_execution_settings_class
Create a request settings object.
get_prompt_execution_settings_class() -> type[PromptExecutionSettings]
Attributes
SUPPORTS_FUNCTION_CALLING
SUPPORTS_FUNCTION_CALLING: ClassVar[bool] = False
is_experimental
is_experimental = True
stage_status
stage_status = 'experimental'
template
template: ONNXTemplate