File tree Expand file tree Collapse file tree 2 files changed +0
-44
lines changed Expand file tree Collapse file tree 2 files changed +0
-44
lines changed Original file line number Diff line number Diff line change 3
3
4
4
This package provides a Python interface to the Langbase API, allowing you to
5
5
build and deploy AI-powered applications using Langbase's infrastructure.
6
-
7
- Basic usage:
8
-
9
- ```python
10
- from langbase import Langbase
11
-
12
- # Initialize the client
13
- lb = Langbase(api_key="your-api-key")
14
-
15
- # Run a pipe
16
- response = lb.pipes.run(
17
- name="your-pipe-name",
18
- messages=[
19
- {"role": "system", "content": "You are a helpful assistant."},
20
- {"role": "user", "content": "Tell me about AI."}
21
- ]
22
- )
23
-
24
- print(response["completion"])
25
6
```
26
7
"""
27
8
Original file line number Diff line number Diff line change @@ -73,31 +73,6 @@ class Workflow:
73
73
"""
74
74
A workflow execution engine that provides step-based execution with retry logic,
75
75
timeouts, and debugging capabilities.
76
-
77
- Example:
78
- ```python
79
- from langbase import Workflow
80
-
81
- # Create a workflow with debugging enabled
82
- workflow = Workflow(debug=True)
83
-
84
- # Define and execute steps
85
- async def my_operation():
86
- return "Hello, World!"
87
-
88
- result = await workflow.step({
89
- "id": "greeting",
90
- "timeout": 5000, # 5 seconds
91
- "retries": {
92
- "limit": 3,
93
- "delay": 1000, # 1 second
94
- "backoff": "exponential"
95
- },
96
- "run": my_operation
97
- })
98
-
99
- print(result) # "Hello, World!"
100
- ```
101
76
"""
102
77
103
78
def __init__ (self , debug : bool = False ):
You can’t perform that action at this time.
0 commit comments