libs.teradata.langchain_teradata.ModelUrlParams = class ModelUrlParams(builtins.object) |
| |
Methods defined here:
- __init__(self, **kwargs)
- DESCRIPTION:
Instantiates the ModelUrlParams class to set up the
model and URL-related parameters for vector store creation.
PARAMETERS:
embedding:
Required for NVIDIA NIM, Optional otherwise.
Specifies the embeddings model to be used for generating the
embeddings.
Default Value:
For AWS: amazon.titan-embed-text-v2:0
For Azure: text-embedding-3-small
Permitted Values:
For AWS:
* amazon.titan-embed-text-v1
* amazon.titan-embed-image-v1
* amazon.titan-embed-text-v2:0
For Azure:
* text-embedding-ada-002
* text-embedding-3-small
* text-embedding-3-large
For NIM:
* Any hosted NVIDIA model for embedding generation
Types: str, TeradataAI
chat_completion_model:
Required for NVIDIA NIM, Optional otherwise.
Specifies the name of the chat completion model to be used for
generating text responses.
Default Value:
For AWS: anthropic.claude-3-haiku-20240307-v1:0
For Azure: gpt-35-turbo-16k
Permitted Values:
*For AWS:
* anthropic.claude-3-haiku-20240307-v1:0
* anthropic.claude-instant-v1
* anthropic.claude-3-5-sonnet-20240620-v1:0
*For Azure:
* gpt-35-turbo-16k
For NIM:
* Any hosted chat completion model
Types: str, TeradataAI
embeddings_base_url:
Required for NVIDIA NIM, Optional otherwise.
Specifies the base URL for the service to be used for generating embeddings.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
completions_base_url:
Optional Argument.
Specifies the base URL for the service to be used for generating completions.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
content_safety_base_url:
Optional Argument.
Specifies the base URL for Guardrails model, which ensures safe outputs from LLM.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
topic_control_base_url:
Optional Argument.
Specifies the base URL for Guardrails model, which ensures topic control.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
jailbreak_detection_base_url:
Optional Argument.
Specifies the base URL for Guardrails model, which ensures jailbreak detection.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
content_safety_model:
Optional Argument.
Specifies the guardrails model for content safety, which ensures safe outputs from LLM.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
topic_control_model:
Optional Argument.
Specifies the guardrails model for topic control.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
guardrails:
Optional Argument.
Specifies what kind of Guardrails to apply.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Default Value: []
Permitted Values: content_safety, topic_control, jailbreak_detection
Types: list[str]
ranking_base_url:
Optional Argument.
Specifies the base URL for the service to be used for the reranker model.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
ranking_model:
Optional Argument.
Specifies the model to be used for reranking the search results.
Note:
* Applicable only while using NVIDIA NIM endpoints.
Types: str
RETURNS:
None.
RAISES:
TeradataMlException.
EXAMPLES:
# Import the required class
>>> from teradatagenai import ModelUrlParams
# Set up model and URL parameters
>>> model_url = ModelUrlParams(emedding = "nvidia/llama-3.2-nv-embedqa-1b-v2",
embeddings_base_url="<Your embeddings base URL>",
chat_completion_model="mistralai/mistral-7b-instruct-v0.3",
completions_base_url="<Your completions base URL>",
content_safety_model="nvidia/llama-3.1-nemoguard-8b-content-safety",
content_safety_base_url="<Your content safety base URL>",
topic_control_model="nvidia/llama-3.1-nemoguard-8b-topic-control",
topic_control_base_url="<Your topic control base URL>",
guardrails=["topic_control", "content_safety"]
)
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|