Route response
get_context(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the context information associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
Context details. |
Source code in view/api/route_responses.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
get_detail(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the detailed response information associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
Detailed response information. |
Source code in view/api/route_responses.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
get_evaluation(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the evaluation associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
Evaluation details. |
Source code in view/api/route_responses.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
get_files(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the file names associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
File names. |
Source code in view/api/route_responses.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
get_messages(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the messages associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
Message details. |
Source code in view/api/route_responses.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
get_response(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the response associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
The analysis response content. |
Source code in view/api/route_responses.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
get_responses_by_user(user=Path(..., description='User e.g.: user'))
async
Fetches all responses associated with a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user
|
str
|
User identifier. |
Path(..., description='User e.g.: user')
|
Returns:
Name | Type | Description |
---|---|---|
dict |
A dictionary of responses for the user. |
Source code in view/api/route_responses.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
get_usage(rag_redis_key=Path(..., description='Redis Key. e.g.: rag:user:8719:medical'))
async
Fetches the token usage associated with a Redis key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
Path(..., description='Redis Key. e.g.: rag:user:8719:medical')
|
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
Token usage details. |
Source code in view/api/route_responses.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
post_evaluation(rag_redis_key, evaluation_items)
async
Submits an evaluation for a response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rag_redis_key
|
str
|
Redis key for the analysis. |
required |
evaluation_items
|
Evaluation
|
Evaluation data. |
required |
Returns:
Name | Type | Description |
---|---|---|
JSONResponse |
The evaluation result. |
Source code in view/api/route_responses.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|