Mercurial
diff mrjunejune/inference_bridge.h @ 260:1f9877b637e9
Add Copilot-powered cyberpunk JRPG chat
Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | |
| children | b401627fc49e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mrjunejune/inference_bridge.h Wed Aug 05 09:19:41 2026 -0700 @@ -0,0 +1,53 @@ +#ifndef MRJUNEJUNE_INFERENCE_BRIDGE_H +#define MRJUNEJUNE_INFERENCE_BRIDGE_H + +#include "dowa/dowa.h" + +typedef struct Inference_Bridge Inference_Bridge; + +typedef struct { + const char *type; + const char *request_id; + const char *conversation_id; + const char *delta; + const char *content; + const char *error_code; + const char *error_message; + int64 input_tokens; + int64 output_tokens; + boolean failed; + boolean aborted; +} Inference_Event; + +typedef void (*Inference_Event_Handler)( + const Inference_Event *p_event, + void *p_user_data); + +Inference_Bridge *Inference_Bridge_Create( + const char *sidecar_path, + const char *copilot_cli_path, + Inference_Event_Handler handler, + void *p_user_data); + +boolean Inference_Bridge_Start(Inference_Bridge *p_bridge); +boolean Inference_Bridge_Is_Ready(const Inference_Bridge *p_bridge); + +boolean Inference_Bridge_Start_Turn( + Inference_Bridge *p_bridge, + const char *request_id, + const char *conversation_id, + const char *prompt); + +boolean Inference_Bridge_Abort_Turn( + Inference_Bridge *p_bridge, + const char *request_id, + const char *conversation_id); + +boolean Inference_Bridge_Delete_Conversation( + Inference_Bridge *p_bridge, + const char *request_id, + const char *conversation_id); + +void Inference_Bridge_Destroy(Inference_Bridge *p_bridge); + +#endif