Add README in English
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
# Stream Agent
|
||||||
|
|
||||||
|
This repository contains a simple LangChain agent that demonstrates the **stream** mode.
|
||||||
|
|
||||||
|
## What it does
|
||||||
|
|
||||||
|
The agent uses OpenAI’s LLM to answer a user query. When the LLM decides to call an external tool it uses a small `get_price` function that returns a fake price for a product in a city. The agent is executed with `AgentExecutor.stream` so the output appears token‑by‑token in the console.
|
||||||
|
|
||||||
|
## How to run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# run the example
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
The script will output the streamed response followed by the final result.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Feel free to experiment by changing the query or the tool implementation.
|
||||||
Reference in New Issue
Block a user