Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerachleff committed Aug 13, 2024
1 parent 32e7d7a commit ea40f01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2555,11 +2555,12 @@ def create_dataset(
inputs_schema=inputs_schema,
outputs_schema=outputs_schema,
)

response = self.request_with_retries(
"POST",
"/datasets",
headers={**self._headers, "Content-Type": "application/json"},
data=dataset.json(),
data=dataset.json(by_alias=True),
)
ls_utils.raise_for_status_with_text(response)
return ls_schemas.Dataset(
Expand Down
9 changes: 7 additions & 2 deletions python/langsmith/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,17 @@ class DatasetBase(BaseModel):
name: str
description: Optional[str] = None
data_type: Optional[DataType] = None
inputs_schema: Optional[Dict[str, Any]] = None
outputs_schema: Optional[Dict[str, Any]] = None
inputs_schema: Optional[Dict[str, Any]] = Field(
None, alias="inputs_schema_definition"
)
outputs_schema: Optional[Dict[str, Any]] = Field(
None, alias="outputs_schema_definition"
)

class Config:
"""Configuration class for the schema."""

allow_population_by_field_name = True
frozen = True


Expand Down

0 comments on commit ea40f01

Please sign in to comment.