File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ os.environ["LANGCHAIN_API_KEY"] = "<YOUR-LANGSMITH-API-KEY>"
57
57
If the environment variables are correctly set, your application will automatically connect to the LangSmith platform.
58
58
59
59
``` python
60
- from langchain.chat_models import ChatOpenAI
60
+ from langchain_core.runnables import chain
61
61
62
- chat = ChatOpenAI()
63
- response = chat.predict(
64
- " Translate this sentence from English to French. I love programming. "
65
- )
66
- print (response )
62
+ @chain
63
+ def add_val ( x : dict ) -> dict :
64
+ return { " val " : x[ " val " ] + 1 }
65
+
66
+ add_val({ " val " : 1 } )
67
67
```
68
68
69
69
### Logging Traces Outside LangChain
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " langsmith"
3
- version = " 0.0.82 "
3
+ version = " 0.0.83 "
4
4
description = " Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
5
5
authors = [" LangChain <support@langchain.dev>" ]
6
6
license = " MIT"
You can’t perform that action at this time.
0 commit comments