Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration: langchain_xai #28862

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions libs/partners/xai/langchain_xai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class Joke(BaseModel):

""" # noqa: E501

model_name: str = Field(alias="model")
model_name: str = Field(default="grok-beta", alias="model")
"""Model name to use."""
xai_api_key: Optional[SecretStr] = Field(
alias="api_key",
Expand All @@ -265,11 +265,10 @@ class Joke(BaseModel):
xai_api_base: str = Field(default="https://api.x.ai/v1/")
"""Base URL path for API requests."""

openai_api_key: Optional[SecretStr] = None
openai_api_base: Optional[str] = None

model_config = ConfigDict(
populate_by_name=True,
extra="forbid",
json_excludes={"openai_api_key"}
)

@property
Expand Down
Loading