Skip to content

Commit d16544b

Browse files
committed
👌 IMPROVE: release system
1 parent 5fac461 commit d16544b

File tree

12 files changed

+327
-142
lines changed

12 files changed

+327
-142
lines changed

.releaserc.json

Lines changed: 0 additions & 64 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1 @@
11
# Changelog
2-
3-
All notable changes to this project will be documented in this file.
4-
5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7-
8-
## [Unreleased]
9-
10-
### Added
11-
- Initial Python SDK for Langbase API
12-
- Support for Pipes, Memories, Threads, Tools, and Workflows
13-
- Comprehensive type definitions and error handling
14-
- Streaming support for real-time responses
15-
- Memory and RAG functionality
16-
- Agent and workflow orchestration
17-
18-
## [0.1.0] - 2024-01-01
19-
20-
### Added
21-
- Initial release of the Langbase Python SDK

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ The following examples are for reference only. Prefer docs for the latest inform
2222

2323
## Installation
2424

25+
Install Langbase SDK:
26+
2527
```bash
2628
pip install langbase
2729
```
2830

31+
Install dotenv:
32+
33+
```bash
34+
pip install dotenv
35+
```
36+
2937
## Quick Start
3038

3139
### 1. Set up your API key
@@ -54,6 +62,7 @@ llm_api_key = os.getenv("LLM_API_KEY")
5462

5563
# Initialize the client
5664
langbase = Langbase(api_key=langbase_api_key)
65+
langbase = Langbase(api_key=langbase_api_key)
5766
```
5867

5968
### 3. Generate text
@@ -188,6 +197,7 @@ results = langbase.memories.retrieve(
188197

189198
```python
190199
# Run an agent with tools
200+
response = langbase.agent.run(
191201
response = langbase.agent.run(
192202
model="openai:gpt-4",
193203
messages=[{"role": "user", "content": "Search for AI news"}],
@@ -202,19 +212,22 @@ response = langbase.agent.run(
202212

203213
```python
204214
# Chunk text for processing
215+
chunks = langbase.chunker(
205216
chunks = langbase.chunker(
206217
content="Long text to split...",
207218
chunk_max_length=1024,
208219
chunk_overlap=256,
209220
)
210221

211222
# Generate embeddings
223+
embeddings = langbase.embed(
212224
embeddings = langbase.embed(
213225
chunks=["Text 1", "Text 2"],
214226
embedding_model="openai:text-embedding-3-small",
215227
)
216228

217229
# Parse documents
230+
content = langbase.parser(
218231
content = langbase.parser(
219232
document=open("document.pdf", "rb"),
220233
document_name="document.pdf",
@@ -224,21 +237,22 @@ content = langbase.parser(
224237

225238
## Examples
226239

227-
Explore the [examples](./examples) directory for complete working examples:
240+
Explore the [examples](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples) directory for complete working examples:
228241

229-
- [Agent with tools](./examples/agent/)
230-
- [Work with memory](./examples/memory/)
231-
- [Generate text](./examples/pipes/pipes.run.py)
232-
- [Document processing](./examples/parser/)
233-
- [Workflow automation](./examples/workflow/)
242+
- [Generate text](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/agent/agent.run.py)
243+
- [Stream text](https://github.com/LangbaseInc/langbase-python-sdk/blob/main/examples/agent/agent.run.stream.py)
244+
- [Work with memory](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/memory/)
245+
- [Agent with tools](https://github.com/LangbaseInc/langbase-python-sdk/blob/main/examples/agent/agent.run.tool.py)
246+
- [Document processing](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/parser/)
247+
- [Workflow automation](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/workflow/)
234248

235249
## SDK Reference
236250

237251
For detailed SDK documentation, visit [langbase.com/docs/sdk](https://langbase.com/docs/sdk).
238252

239253
## Contributing
240254

241-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
255+
We welcome contributions! Please see our [Contributing Guide](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/CONTRIBUTING.md) for details.
242256

243257
## Support
244258

@@ -248,4 +262,4 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
248262

249263
## License
250264

251-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
265+
See the [LICENSE](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/LICENSE) file for details.

examples/agent/agent.run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ def main():
2020

2121
if not langbase_api_key:
2222
print("❌ Missing LANGBASE_API_KEY in environment variables.")
23-
print("Please set: export LANGBASE_API_KEY='your_langbase_api_key'")
23+
print("Please set: LANGBASE_API_KEY='your_langbase_api_key' in .env file")
2424
exit(1)
2525

2626
if not llm_api_key:
2727
print("❌ Missing LLM_API_KEY in environment variables.")
28-
print("Please set: export LLM_API_KEY='your_llm_api_key'")
28+
print("Please set: LLM_API_KEY='your_llm_api_key' in .env file")
2929
exit(1)
3030

3131
# Initialize Langbase client

examples/agent/agent.run.stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main():
2020

2121
if not langbase_api_key:
2222
print("❌ Missing LANGBASE_API_KEY in environment variables.")
23-
print("Please set: export LANGBASE_API_KEY='your_langbase_api_key'")
23+
print("Please set: LANGBASE_API_KEY='your_langbase_api_key' in .env file")
2424
exit(1)
2525

2626
# Initialize Langbase client

examples/agent/agent.run.workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def main():
3131

3232
if not llm_api_key:
3333
print("❌ Missing LLM_API_KEY in environment variables.")
34-
print("Please set: export LLM_API_KEY='your_llm_api_key'")
34+
print("Please set: LLM_API_KEY='your_llm_api_key' in .env file")
3535
exit(1)
3636

3737
# Initialize Langbase client and Workflow

examples/workflow/email_processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ async def process_email(email_content: str):
3333

3434
if not langbase_api_key:
3535
print("❌ Missing LANGBASE_API_KEY in environment variables.")
36-
print("Please set: export LANGBASE_API_KEY='your_langbase_api_key'")
36+
print("Please set: LANGBASE_API_KEY='your_langbase_api_key' in .env file")
3737
exit(1)
3838

3939
if not llm_api_key:
4040
print("❌ Missing LLM_API_KEY in environment variables.")
41-
print("Please set: export LLM_API_KEY='your_llm_api_key'")
41+
print("Please set: LLM_API_KEY='your_llm_api_key' in .env file")
4242
exit(1)
4343

4444
# Initialize Langbase

examples/workflow/summarization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ async def process_text(input_text: str):
3232

3333
if not langbase_api_key:
3434
print("❌ Missing LANGBASE_API_KEY in environment variables.")
35-
print("Please set: export LANGBASE_API_KEY='your_langbase_api_key'")
35+
print("Please set: LANGBASE_API_KEY='your_langbase_api_key' in .env file")
3636
exit(1)
3737

3838
if not llm_api_key:
3939
print("❌ Missing LLM_API_KEY in environment variables.")
40-
print("Please set: export LLM_API_KEY='your_llm_api_key'")
40+
print("Please set: LLM_API_KEY='your_llm_api_key' in .env file")
4141
exit(1)
4242

4343
# Initialize Langbase

langbase/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
)
6464
from .workflow import TimeoutError, Workflow
6565

66-
__version__ = "0.1.0"
66+
__version__ = "0.0.0"
6767
__author__ = "LangbaseInc"
6868
__description__ = "Python SDK for the Langbase API"
6969

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
[project]
22
name = "langbase"
3-
version = "0.1.0"
3+
version = "0.0.0"
44
description = "Python SDK for the Langbase API"
55
readme = "README.md"
66
license = {text = "Apache-2.0"}
77
authors = [
8-
{ name = "Saqib", email = "[email protected]" },
9-
{ name = "Ankit", email = "[email protected]" },
8+
{ name = "Saqib Ameen", email = "[email protected]" },
9+
{ name = "Ankit Kumar", email = "[email protected]" },
1010
]
1111
requires-python = ">=3.7"
12-
keywords = ["ai", "langbase", "agent", "memory", "rag", "mcp", "pipes", "workflow"]
12+
keywords = ["ai", "langbase", "agent", "memory", "rag", "mcp", "pipes", "workflow", "llms"]
1313
classifiers = [
14-
"Development Status :: 4 - Beta",
1514
"Intended Audience :: Developers",
1615
"License :: OSI Approved :: Apache Software License",
1716
"Operating System :: OS Independent",

0 commit comments

Comments
 (0)