mirror of
https://gh-proxy.org/https://github.com/klinsmaya/gateway.git
synced 2026-11-10 10:07:26 +08:00
PluginContext should contain the following keys
{
"hookType": "beforeRequestHook", // or `afterRequestHook`
"request": {
// The raw body of the incoming request
"body": {},
// Processed text by extracting the prompt or messages and putting them together
"text": ""
},
"response": {
// The raw body of the outgoing response
"body": {},
// Processed text by extracting the choices or messages and putting them together
"text": ""
},
}
Todos
- Do plugin function evaluations support default values?
- Plugins should handle finding the text
- Plugins before being called should check if they support that particular hook type or should be skipped.
- Will need to support enum names
- Tools need to be supported on Portkey