Skip to content

Commit

Permalink
unnec
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Apr 10, 2024
1 parent 7205d0d commit 1f1af64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/langsmith/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def unit(*args: Any, **kwargs: Any) -> Callable:
>>> os.environ["LANGCHAIN_TEST_CACHE"] = "tests/cassettes"
>>> import openai
>>> from langsmith.wrappers import wrap_openai
>>> @unit()
>>> @unit
... def test_openai_says_hello():
... # Traced code will be included in the test case
... oai_client = wrap_openai(openai.Client())
Expand Down
9 changes: 3 additions & 6 deletions python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,9 @@ def _get_paginated_list(
while True:
params_["offset"] = offset
response = self.request_with_retries(
"GET", path, params=params_, stop_after_attempt=1
"GET",
path,
params=params_,
)
items = response.json()

Expand Down Expand Up @@ -2330,7 +2332,6 @@ def read_dataset(
response = self.request_with_retries(
"GET",
path,
stop_after_attempt=3,
params=params,
)
result = response.json()
Expand Down Expand Up @@ -2452,7 +2453,6 @@ def read_dataset_openai_finetuning(
response = self.request_with_retries(
"GET",
f"{path}/{_as_uuid(dataset_id, 'dataset_id')}/openai_ft",
stop_after_attempt=3,
)
dataset = [json.loads(line) for line in response.text.strip().split("\n")]
return dataset
Expand Down Expand Up @@ -2659,7 +2659,6 @@ def read_dataset_version(
response = self.request_with_retries(
"GET",
f"/datasets/{_as_uuid(dataset_id, 'dataset_id')}/version",
stop_after_attempt=3,
params={"as_of": as_of, "tag": tag},
)
return ls_schemas.DatasetVersion(**response.json())
Expand Down Expand Up @@ -3017,7 +3016,6 @@ def read_example(
response = self.request_with_retries(
"GET",
f"/examples/{_as_uuid(example_id, 'example_id')}",
stop_after_attempt=3,
params={
"as_of": as_of.isoformat() if as_of else None,
},
Expand Down Expand Up @@ -3535,7 +3533,6 @@ def read_feedback(self, feedback_id: ID_TYPE) -> ls_schemas.Feedback:
response = self.request_with_retries(
"GET",
f"/feedback/{_as_uuid(feedback_id, 'feedback_id')}",
stop_after_attempt=3,
)
return ls_schemas.Feedback(**response.json())

Expand Down

0 comments on commit 1f1af64

Please sign in to comment.