plexus.LangChainUser module

class plexus.LangChainUser.LangChainUser(**parameters)

Bases: object

MAX_RETRY_ATTEMPTS = 20
class Parameters(*, model_provider: Literal['ChatOpenAI', 'AzureChatOpenAI', 'BedrockChat', 'ChatVertexAI'] = 'AzureChatOpenAI', model_name: str | None = None, base_model_name: str | None = None, model_region: str | None = None, temperature: float | None = 0, top_p: float | None = 0.03, max_tokens: int | None = 500)

Bases: BaseModel

Parameters for this node. Based on the LangGraphScore.Parameters class.

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.

base_model_name: str | None
max_tokens: int | None
model_config: ClassVar[ConfigDict] = {'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_name: str | None
model_provider: Literal['ChatOpenAI', 'AzureChatOpenAI', 'BedrockChat', 'ChatVertexAI']
model_region: str | None
temperature: float | None
top_p: float | None
__init__(**parameters)
async cleanup()

Clean up Azure credentials and any associated threads.

get_azure_credential()

Get Azure credential for authentication.

get_token_usage()