gen_ai_hub.proxy.langchain
index
/home/jenkins/agent/workspace/ation_generative-ai-hub-sdk_main/gen_ai_hub/proxy/langchain/__init__.py

 
Package Contents
       
amazon
base
google_vertexai
init_models
openai

 
Functions
       
init_embedding_model(*args, proxy_client: 'Optional[BaseProxyClient]' = None, init_func: 'Optional[Callable]' = None, model_id: 'Optional[str]' = '', **kwargs) -> 'Embeddings'
Initializes an embedding model using the specified parameters.
 
:param proxy_client: The proxy client to use for the model (optional)
:type proxy_client: BaseProxyClient
:param init_func: Function to call for initializing the model, optional
:type init_func: Callable
:param model_id: id of the Amazon Bedrock model, needed in case a custom Amazon Bedrock model is being
                 initiated (optional)
:type model_id: str
:return: The initialized embedding model
:rtype: Embeddings
init_llm(*args, proxy_client: 'Optional[BaseProxyClient]' = None, temperature: 'float' = 0.0, max_tokens: 'int' = 256, top_k: 'Optional[int]' = None, top_p: 'float' = 1.0, init_func: 'Optional[Callable]' = None, model_id: 'Optional[str]' = '', **kwargs) -> 'BaseLanguageModel'
Initializes a language model using the specified parameters.
 
:param proxy_client: The proxy client to use for the model (optional)
:type proxy_client: ProxyClient
:param temperature: The temperature parameter for model generation (default: 0.0)
:type temperature: float
:param max_tokens: The maximum number of tokens to generate (default: 256)
:type max_tokens: int
:param top_k: The top-k parameter for model generation (optional)
:type top_k: int
:param top_p: The top-p parameter for model generation (default: 1.0)
:type top_p: float
:param init_func: Function to call for initializing the model, optional
:type init_func: Callable
:param model_id: id of the Amazon Bedrock model, needed in case a custom Amazon Bedrock model is being
                 initiated (optional)
:type model_id: str
:return: The initialized language model
:rtype: BaseLanguageModel

 
Data
        __all__ = ['init_llm', 'init_embedding_model']