Skip to content

Commit

Permalink
Fix: lint errors and update Field alias in models.py and AutoSelectio…
Browse files Browse the repository at this point in the history
…nScorer initialization (#22846)

This PR addresses several lint errors in the core package of LangChain.
Specifically, the following issues were fixed:

1.Unexpected keyword argument "required" for "Field"  [call-arg]
2.tests/integration_tests/chains/test_cpal.py:263: error: Unexpected
keyword argument "narrative_input" for "QueryModel" [call-arg]
  • Loading branch information
daniyuu authored Jun 14, 2024
1 parent 5bc7748 commit 57783c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions libs/experimental/langchain_experimental/cpal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ class ResultModel(BaseModel):
class StoryModel(BaseModel):
"""Story data."""

causal_operations: Any = Field(required=True)
intervention: Any = Field(required=True)
query: Any = Field(required=True)
causal_operations: Any = Field()
intervention: Any = Field()
query: Any = Field()
_outcome_table: Any = PrivateAttr(default=None)
_networkx_wrapper: Any = PrivateAttr(default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_query_chain(self) -> None:
expected_output = {
"chain_answer": None,
"chain_data": QueryModel(
narrative_input="how many pets does jan have? ",
question="how many pets does jan have? ",
llm_error_msg="",
expression="SELECT name, value FROM df WHERE name = 'jan'",
),
Expand Down

0 comments on commit 57783c5

Please sign in to comment.