Skip to content

Commit 2c7f166

Browse files
authored
Release: 0.0.84 (#388)
1 parent 003ef89 commit 2c7f166

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
11
# LangSmith Client SDKs
22

3-
This repository contains `BaseTracer` schemas used in LangChain as well as the Python and Javascript clients for interacting with the [LangSmith platform](https://smith.langchain.com/).
3+
This repository contains the Python and Javascript SDK's for interacting with the [LangSmith platform](https://smith.langchain.com/).
44

5-
LangSmith helps you and your team debug, evaluate, and monitor your language models and intelligent agents. It works
5+
LangSmith helps your team debug, evaluate, and monitor your language models and intelligent agents. It works
66
with any LLM Application, including a native integration with the [LangChain Python](https://github.com/hwchase17/langchain) and [LangChain JS](https://github.com/hwchase17/langchainjs) open source libraries.
77

88
LangSmith is developed and maintained by [LangChain](https://langchain.com/), the company behind the LangChain framework.
99

10-
⚠️ The SDK and LangSmith platform is still in early beta and continuously evolving!
11-
1210
## Quick Start
1311

1412
To get started with the Python SDK, [install the package](https://pypi.org/project/langsmith/), then follow the instructions in the [Python README](python/README.md).
1513

1614
```bash
17-
pip install langsmith
15+
pip install -U langsmith
16+
export LANGCHAIN_API_KEY=ls_...
17+
```
18+
19+
Then start tracing your app:
20+
21+
```
22+
import openai
23+
from langsmith import traceable
24+
from langsmith.wrappers import wrap_openai
25+
26+
client = wrap_openai(openai.Client())
27+
28+
client.chat.completions.create(
29+
messages=[{"role": "user", "content": "Hello, world"}],
30+
model="gpt-3.5-turbo"
31+
)
1832
```
1933

2034
To get started with the JavaScript / TypeScript SDK, [install the package](https://www.npmjs.com/package/langsmith), then follow the instructions in the [JS README](js/README.md).
2135

2236
```bash
2337
yarn add langsmith
38+
export LANGCHAIN_API_KEY=ls_...
2439
```
2540

41+
Then start tracing your app!
42+
2643
## Cookbook
2744

2845
For tutorials on how to get more value out of LangSmith, check out the [Langsmith Cookbook](https://github.com/langchain-ai/langsmith-cookbook/tree/main) repo.

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langsmith"
3-
version = "0.0.83"
3+
version = "0.0.84"
44
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
55
authors = ["LangChain <support@langchain.dev>"]
66
license = "MIT"

python/tests/integration_tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def test_create_run_with_masked_inputs_outputs(
345345
if project.name == project_name:
346346
langchain_client.delete_project(project_name=project_name)
347347

348-
run_id = "8bac165f-470e-4bf8-baa0-15f2de4cc706"
348+
run_id = uuid4()
349349
langchain_client.create_run(
350350
id=run_id,
351351
project_name=project_name,
@@ -359,7 +359,7 @@ def test_create_run_with_masked_inputs_outputs(
359359
hide_outputs=True,
360360
)
361361

362-
run_id2 = "8bac165f-490e-4bf8-baa0-15f2de4cc707"
362+
run_id2 = uuid4()
363363
langchain_client.create_run(
364364
id=run_id2,
365365
project_name=project_name,

python/tests/integration_tests/test_runs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@pytest.fixture
1717
def langchain_client() -> Generator[Client, None, None]:
1818
original = os.environ.get("LANGCHAIN_ENDPOINT")
19-
os.environ["LANGCHAIN_ENDPOINT"] = "http://localhost:1984"
19+
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
2020
yield Client()
2121
if original is None:
2222
os.environ.pop("LANGCHAIN_ENDPOINT")
@@ -135,18 +135,15 @@ async def my_chain_run(text: str):
135135
assert runs_dict["my_chain_run"].execution_order == 1
136136
assert runs_dict["my_run"].parent_run_id == runs_dict["my_chain_run"].id
137137
assert runs_dict["my_run"].run_type == "chain"
138-
assert runs_dict["my_run"].execution_order == 2
139138
assert runs_dict["my_llm_run"].parent_run_id == runs_dict["my_run"].id
140139
assert runs_dict["my_llm_run"].run_type == "llm"
141140
assert runs_dict["my_llm_run"].inputs == {"text": "foo"}
142-
assert runs_dict["my_llm_run"].execution_order == 3
143141
assert runs_dict["my_sync_tool"].parent_run_id == runs_dict["my_run"].id
144142
assert runs_dict["my_sync_tool"].run_type == "tool"
145143
assert runs_dict["my_sync_tool"].inputs == {
146144
"text": "foo",
147145
"my_arg": 20,
148146
}
149-
assert runs_dict["my_sync_tool"].execution_order == 4
150147
langchain_client.delete_project(project_name=project_name)
151148

152149

0 commit comments

Comments
 (0)