Skip to content

Commit 7b36274

Browse files
committed
Update base.py.
1 parent c49e6f8 commit 7b36274

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ads/llm/langchain/plugins/base.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
from typing import Any, Dict, List, Optional
77

88
from langchain.llms.base import LLM
9-
from langchain.load.serializable import Serializable
109
from langchain.pydantic_v1 import BaseModel, Field, root_validator
1110

1211
from ads.common.auth import default_signer
1312
from ads.config import COMPARTMENT_OCID
1413

1514

16-
class BaseLLM(LLM, Serializable):
15+
class BaseLLM(LLM):
1716
"""Base OCI LLM class. Contains common attributes."""
1817

1918
auth: dict = Field(default_factory=default_signer, exclude=True)
@@ -58,6 +57,14 @@ def is_lc_serializable(cls) -> bool:
5857
class GenerativeAiClientModel(BaseModel):
5958
"""Base model for generative AI embedding model and LLM."""
6059

60+
# This auth is the same as the auth in BaseLLM class.
61+
# However, this is needed for the Gen AI embedding model.
62+
# Do not remove this attribute
63+
auth: dict = Field(default_factory=default_signer, exclude=True)
64+
"""ADS auth dictionary for OCI authentication.
65+
This can be generated by calling `ads.common.auth.api_keys()` or `ads.common.auth.resource_principal()`.
66+
If this is not provided then the `ads.common.default_signer()` will be used."""
67+
6168
client: Any #: :meta private:
6269
"""OCI GenerativeAiClient."""
6370

0 commit comments

Comments
 (0)