remove dockerfile, update readmes

This commit is contained in:
vbarda
2024-06-18 12:07:37 -04:00
parent 2b0fcb26f9
commit 47f777c0f2
3 changed files with 83 additions and 13 deletions
-12
View File
@@ -1,12 +0,0 @@
FROM python:3.9
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install poetry && poetry config virtualenvs.create false && poetry install --with test
RUN poetry run pytest
+48
View File
@@ -0,0 +1,48 @@
# LangGraph JS/TS SDK
This repository contains the JS/TS SDK for interacting with the LangGraph REST API.
## Quick Start
To get started with the JS/TS SDK, [install the package](https://www.npmjs.com/package/@langchain/langgraph-sdk)
```bash
yarn add @langchain/langgraph-sdk
```
You will need a running LangGraph API server. If you're running a server locally using `langgraph-cli`, SDK will automatically point at `http://localhost:8123`, otherwise
you would need to specify the server URL when creating a client.
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client();
// List all assistants
const assistants = await client.assistants.search({
metadata: null,
offset: 0,
limit: 10,
});
// We auto-create an assistant for each graph you register in config.
const agent = assistants[0];
// Start a new thread
const thread = await client.threads.create();
// Start a streaming run
const messages = [{ role: "human", content: "whats the weather in la" }];
const streamResponse = client.runs.stream(
thread["thread_id"],
agent["assistant_id"],
{
input: { messages },
}
);
for await (const chunk of streamResponse) {
console.log(chunk);
}
```
+35 -1
View File
@@ -1 +1,35 @@
# langgraph
# LangGraph Python SDK
This repository contains the Python SDK for interacting with the LangGraph REST API.
## Quick Start
To get started with the Python SDK, [install the package](https://pypi.org/project/langgraph-sdk/)
```bash
pip install -U langgraph-sdk
```
You will need a running LangGraph API server. If you're running a server locally using `langgraph-cli`, SDK will automatically point at `http://localhost:8123`, otherwise
you would need to specify the server URL when creating a client.
```python
from langgraph_sdk import get_client
# If you're using a remote server, initialize the client with `get_client(url=REMOTE_URL)`
client = get_client()
# List all assistants
assistants = await client.assistants.search()
# We auto-create an assistant for each graph you register in config.
agent = assistants[0]
# Start a new thread
thread = await client.threads.create()
# Start a streaming run
input = {"messages": [{"role": "human", "content": "whats the weather in la"}]}
async for chunk in client.runs.stream(thread['thread_id'], agent['assistant_id'], input=input):
print(chunk)
```