Skip to content

Commit

Permalink
0.0.20 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw authored Aug 8, 2023
1 parent 7445b6e commit 90e714c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langsmith",
"version": "0.0.19",
"version": "0.0.20",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
"files": [
"dist/",
Expand Down
8 changes: 6 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ os.environ["LANGCHAIN_API_KEY"] = "<YOUR-LANGSMITH-API-KEY>"

2. **Log traces**

a. You can choose to use the `traceable` decorator to automatically trace your application. An example is below:
The easiest way to log traces using the SDK is via the `@traceable` decorator. Below is an example.

```python
from datetime import datetime
from typing import List, Optional, Tuple
Expand Down Expand Up @@ -121,8 +122,11 @@ def argument_chain(query: str, additional_description: str = "") -> str:
argument = argument_generator(query, additional_description)
# ... Do other processing or call other functions...
return argument

argument_chain("Why is blue better than orange?")
```
b. Manually logging using a `RunTree`

Alternatively, you can manually log events using the `Client` directly or using a `RunTree`, which is what the traceable decorator is meant to manage for you!

A RunTree tracks your application. Each RunTree object is required to have a `name` and `run_type`. These and other important attributes are as follows:

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langsmith"
version = "0.0.19"
version = "0.0.20"
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
authors = ["LangChain"]
license = "MIT"
Expand Down

0 comments on commit 90e714c

Please sign in to comment.