ToolSet Server
graphorchestrator.toolsetserver.runtime
StateModel
Bases: BaseModel
Represents the state model for messages.
Attributes:
Name | Type | Description |
---|---|---|
messages |
List[Any]
|
A list to store messages of any type. |
Source code in graphorchestrator\toolsetserver\runtime.py
16 17 18 19 20 21 22 23 24 |
|
ToolSetServer
Base class for creating a tool set server.
This class handles the creation of FastAPI endpoints for registered tool methods.
Source code in graphorchestrator\toolsetserver\runtime.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
|
authenticate(token)
classmethod
Authenticates a request based on the provided token.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token
|
str
|
The authentication token. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the token is valid, False otherwise. |
Source code in graphorchestrator\toolsetserver\runtime.py
178 179 180 181 182 183 184 185 186 187 188 189 190 |
|
serve(**uvicorn_kwargs)
classmethod
Starts the FastAPI server synchronously.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**uvicorn_kwargs
|
Any
|
Keyword arguments to pass to uvicorn.run. |
{}
|
Raises:
Type | Description |
---|---|
RuntimeError
|
If there's an error during server start-up. |
Source code in graphorchestrator\toolsetserver\runtime.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
serve_async(**uvicorn_kwargs)
async
classmethod
Starts the FastAPI server asynchronously.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**uvicorn_kwargs
|
Any
|
Keyword arguments to pass to uvicorn.run. |
{}
|
Raises: RuntimeError: If there's an error during server start-up.
Source code in graphorchestrator\toolsetserver\runtime.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
|