Source
get_conversation_id_header(request)
async
Get the conversation id from the request header.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
Request
|
The request object. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
conversation_id |
str | None
|
The conversation ID. |
Source code in mycxo/boxtalk/routes/api/external/route.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
get_or_create_conversation_id(request)
async
Get or create a conversation ID for use in the LLM
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
Request
|
The request object. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
conversation_id |
UUID
|
The conversation ID. |
Source code in mycxo/boxtalk/routes/api/external/route.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
introspect_api_token(request, credentials=Depends(http_bearer))
async
Validate the API token from the X-RocketFuel-Token header. The token should be base64 encoded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
Request
|
The request object. |
required |
credentials
|
HTTPAuthorizationCredentials
|
The HTTP authorization credentials. |
Depends(http_bearer)
|
x_rocketfuel_token
|
str | None
|
The RocketFuel token from the X-RocketFuel-Token header. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
request |
Request
|
The request object with the validated token. |
Source code in mycxo/boxtalk/routes/api/external/route.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
set_conversation_id_header(response, conversation_id)
async
Set the conversation id in the response header.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
response
|
Response
|
The response object. |
required |
conversation_id
|
UUID
|
The conversation ID. |
required |
Source code in mycxo/boxtalk/routes/api/external/route.py
77 78 79 80 81 82 83 84 85 86 87 88 89 | |
RocketfuelResults
Bases: BaseModel
The results of the Rocketfuel agent.
Attributes:
| Name | Type | Description |
|---|---|---|
thoughts |
list[str]
|
The thoughts of the agent |
sql_query |
str
|
The SQL query to be executed |
result |
str
|
The result of the SQL query in CSV format |
Source code in mycxo/boxtalk/models/rocketfuel_results.py
4 5 6 7 8 9 10 11 12 13 14 15 16 | |