-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
export OPENAI_API_KEY= | ||
export LANGCHAIN_TRACING_V2=true | ||
export LANGCHAIN_ENDPOINT=https://api.smith.langchain.com | ||
export LANGCHAIN_API_KEY=<your-api-key> | ||
# if LANGCHAIN_PROJECT not specified, defaults to "default" | ||
export LANGCHAIN_PROJECT=<your-project> | ||
|
||
export OPENAI_API_KEY=<your-openai-api-key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
from my_app.chain import chain | ||
import langsmith | ||
from datetime import datetime | ||
|
||
def test_chain(): | ||
print( | ||
chain.invoke({"text": "Hi there, do you have any gold for me?"}).content | ||
client = langsmith.Client() | ||
|
||
chain_results = client.run_on_dataset( | ||
dataset_name="pirate-dataset", | ||
llm_or_chain_factory=chain, | ||
project_name=f"pirate-dataset-test-{int(datetime.now().strftime('%Y%m%d%H%M%S'))}", | ||
concurrency_level=5, | ||
verbose=True, | ||
) |