Skip to content

Commit

Permalink
0.1.0 (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw authored Feb 15, 2024
1 parent fbdcbd9 commit 4ef2c93
Show file tree
Hide file tree
Showing 12 changed files with 468 additions and 676 deletions.
4 changes: 3 additions & 1 deletion .github/actions/python-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ runs:
working-directory: python

- name: Install dependencies
run: poetry install --with dev
run: |
poetry install --with dev
poetry run pip install -U langchain
shell: bash
working-directory: python

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
- name: Install poetry
run: pipx install poetry==1.4.2
- name: Install dependencies
run: poetry install --with dev
run: |
poetry install --with dev
poetry run pip install -U langchain
- name: Run Python integration tests
uses: ./.github/actions/python-integration-tests
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Links

on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 5 * * *'
workflow_dispatch:

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check links in Markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1
10 changes: 7 additions & 3 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:
- name: Install poetry
run: pipx install poetry==$POETRY_VERSION
- name: Install dependencies
run: poetry install --with dev,lint
run: |
poetry install --with dev,lint
poetry run pip install -U langchain
- name: Analysing the code with our lint
run: make lint

Expand All @@ -72,7 +74,9 @@ jobs:
- name: Install poetry
run: pipx install poetry==$POETRY_VERSION
- name: Install dependencies
run: poetry install
run: |
poetry install --with dev
poetry run pip install -U langchain
- name: Run tests
run: make tests
shell: bash
shell: bash
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository contains the Python and Javascript SDK's for interacting with the [LangSmith platform](https://smith.langchain.com/).

LangSmith helps your team debug, evaluate, and monitor your language models and intelligent agents. It works
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.
with any LLM Application, including a native integration with the [LangChain Python](https://github.com/langchain-ai/langchain) and [LangChain JS](https://github.com/langchain-ai/langchainjs) open source libraries.

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

Expand All @@ -19,7 +19,7 @@ export LANGCHAIN_API_KEY=ls_...

Then start tracing your app:

```
```python
import openai
from langsmith import traceable
from langsmith.wrappers import wrap_openai
Expand All @@ -42,6 +42,42 @@ export LANGCHAIN_API_KEY=ls_...

Then start tracing your app!

```javascript
import { traceable } from "langsmith/traceable";
import { OpenAI } from "openai";

const client = new OpenAI();

const createCompletion = traceable(
openai.chat.completions.create.bind(openai.chat.completions),
{ name: "OpenAI Chat Completion", run_type: "llm" }
);

await createCompletion({
model: "gpt-3.5-turbo",
messages: [{ content: "Hi there!", role: "user" }],
});
```

```
{
id: 'chatcmpl-8sOWEOYVyehDlyPcBiaDtTxWvr9v6',
object: 'chat.completion',
created: 1707974654,
model: 'gpt-3.5-turbo-0613',
choices: [
{
index: 0,
message: { role: 'assistant', content: 'Hello! How can I help you today?' },
logprobs: null,
finish_reason: 'stop'
}
],
usage: { prompt_tokens: 10, completion_tokens: 9, total_tokens: 19 },
system_fingerprint: null
}
```

## Cookbook

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.
Expand Down
Loading

0 comments on commit 4ef2c93

Please sign in to comment.