Skip to content

Commit fc4d665

Browse files
committed
👌 IMPROVE: release system
1 parent a4b9a9c commit fc4d665

File tree

12 files changed

+333
-154
lines changed

12 files changed

+333
-154
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: 28 additions & 20 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
@@ -53,14 +61,14 @@ langbase_api_key = os.getenv("LANGBASE_API_KEY")
5361
llm_api_key = os.getenv("LLM_API_KEY")
5462

5563
# Initialize the client
56-
lb = Langbase(api_key=langbase_api_key)
64+
langbase = Langbase(api_key=langbase_api_key)
5765
```
5866

5967
### 3. Generate text
6068

6169
```python
6270
# Simple generation
63-
response = lb.agent.run(
71+
response = langbase.agent.run(
6472
input=[{"role": "user", "content": "Tell me about AI"}],
6573
model="openai:gpt-4.1-mini",
6674
api_key=llm_api_key,
@@ -148,10 +156,10 @@ runner.process()
148156

149157
```python
150158
# List all pipes
151-
pipes = lb.pipes.list()
159+
pipes = langbase.pipes.list()
152160

153161
# Run a pipe
154-
response = lb.pipes.run(
162+
response = langbase.pipes.run(
155163
name="ai-agent",
156164
messages=[{"role": "user", "content": "Hello!"}],
157165
variables={"style": "friendly"}, # Optional variables
@@ -163,21 +171,21 @@ response = lb.pipes.run(
163171

164172
```python
165173
# Create a memory
166-
memory = lb.memories.create(
174+
memory = langbase.memories.create(
167175
name="product-docs",
168176
description="Product documentation",
169177
)
170178

171179
# Upload documents
172-
lb.memories.documents.upload(
180+
langbase.memories.documents.upload(
173181
memory_name="product-docs",
174182
document_name="guide.pdf",
175183
document=open("guide.pdf", "rb"),
176184
content_type="application/pdf",
177185
)
178186

179187
# Retrieve relevant context
180-
results = lb.memories.retrieve(
188+
results = langbase.memories.retrieve(
181189
query="How do I get started?",
182190
memory=[{"name": "product-docs"}],
183191
top_k=3,
@@ -188,7 +196,7 @@ results = lb.memories.retrieve(
188196

189197
```python
190198
# Run an agent with tools
191-
response = lb.agent.run(
199+
response = langbase.agent.run(
192200
model="openai:gpt-4",
193201
messages=[{"role": "user", "content": "Search for AI news"}],
194202
tools=[{"type": "function", "function": {...}}],
@@ -202,20 +210,20 @@ response = lb.agent.run(
202210

203211
```python
204212
# Chunk text for processing
205-
chunks = lb.chunker(
213+
chunks = langbase.chunker(
206214
content="Long text to split...",
207215
chunk_max_length=1024,
208216
chunk_overlap=256,
209217
)
210218

211219
# Generate embeddings
212-
embeddings = lb.embed(
220+
embeddings = langbase.embed(
213221
chunks=["Text 1", "Text 2"],
214222
embedding_model="openai:text-embedding-3-small",
215223
)
216224

217225
# Parse documents
218-
content = lb.parser(
226+
content = langbase.parser(
219227
document=open("document.pdf", "rb"),
220228
document_name="document.pdf",
221229
content_type="application/pdf",
@@ -224,22 +232,22 @@ content = lb.parser(
224232

225233
## Examples
226234

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

229-
- [Generate text](./examples/pipes/pipes.run.py)
230-
- [Stream text with events](./examples/pipes/pipes.run.typed-stream.py)
231-
- [Work with memory](./examples/memory/)
232-
- [Agent with tools](./examples/agent/)
233-
- [Document processing](./examples/parser/)
234-
- [Workflow automation](./examples/workflow/)
237+
- [Generate text](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/agent/agent.run.py)
238+
- [Stream text](https://github.com/LangbaseInc/langbase-python-sdk/blob/main/examples/agent/agent.run.stream.py)
239+
- [Work with memory](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/memory/)
240+
- [Agent with tools](https://github.com/LangbaseInc/langbase-python-sdk/blob/main/examples/agent/agent.run.tool.py)
241+
- [Document processing](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/parser/)
242+
- [Workflow automation](https://github.com/LangbaseInc/langbase-python-sdk/tree/main/examples/workflow/)
235243

236244
## SDK Reference
237245

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

240248
## Contributing
241249

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

244252
## Support
245253

@@ -249,4 +257,4 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
249257

250258
## License
251259

252-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
260+
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)