OCIGenAIBase#

class langchain_community.llms.oci_generative_ai.OCIGenAIBase[source]#

Bases: BaseModel, ABC

Base class for OCI GenAI models

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param auth_profile: str | None = 'DEFAULT'#

The name of the profile in ~/.oci/config If not specified , DEFAULT will be used

param auth_type: str | None = 'API_KEY'#

Authentication type, could be

API_KEY, SECURITY_TOKEN, INSTANCE_PRINCIPAL, RESOURCE_PRINCIPAL

If not specified, API_KEY will be used

param compartment_id: str | None = None#

OCID of compartment

param is_stream: bool = False#

Whether to stream back partial progress

param model_id: str | None = None#

Id of the model to call, e.g., cohere.command

param model_kwargs: Dict | None = None#

Keyword arguments to pass to the model

param provider: str | None = None#

Provider name of the model. Default to None, will try to be derived from the model_id otherwise, requires user input

param service_endpoint: str | None = None#

service endpoint url

classmethod validate_environment(values: Dict) Dict[source]#

Validate that OCI config and python package exists in environment.

Parameters:

values (Dict)

Return type:

Dict