Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Commit 4656949

Browse files
authored
Update README.md
1 parent 08eb311 commit 4656949

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,23 @@ pip install lmnr
3636

3737
### Use Index via API
3838
```python
39-
from lmnr import Laminar, AsyncLaminarClient
40-
import asyncio
39+
from lmnr import Laminar, LaminarClient
4140
# you can also set LMNR_PROJECT_API_KEY environment variable
4241

4342
# Initialize tracing
4443
Laminar.initialize(project_api_key="your_api_key")
4544

4645
# Initialize the client
47-
client = AsyncLaminarClient(project_api_key="your_api_key")
48-
49-
async def main():
50-
51-
response = await client.agent.run(
52-
prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"
53-
)
46+
client = LaminarClient(project_api_key="your_api_key")
5447

55-
print(response.result)
48+
for chunk in client.agent.run(
49+
stream=True,
50+
model_provider="gemini",
51+
model="gemini-2.5-pro-preview-03-25"
52+
prompt="Navigate to news.ycombinator.com, find a post about AI, and summarize it"
53+
):
54+
print(chunk)
5655

57-
if __name__ == "__main__":
58-
asyncio.run(main())
5956
```
6057
## Local Quick Start
6158

0 commit comments

Comments
 (0)