Methods
__init__(**kwargs)
Creates a new Agent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs
|
arguments to pass to the underlying Agent backend and LLM pipeline instance |
{}
|
Source code in txtai/agent/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
__call__(text, maxlength=8192, stream=False, **kwargs)
Runs an agent loop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
instructions to run |
required | |
maxlength
|
maximum sequence length |
8192
|
|
stream
|
stream response if True, defaults to False |
False
|
|
kwargs
|
additional keyword arguments |
{}
|
Returns:
Type | Description |
---|---|
result |
Source code in txtai/agent/base.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|