Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 259:667156fcd3e3 | 260:1f9877b637e9 |
|---|---|
| 1 #ifndef MRJUNEJUNE_INFERENCE_BRIDGE_H | |
| 2 #define MRJUNEJUNE_INFERENCE_BRIDGE_H | |
| 3 | |
| 4 #include "dowa/dowa.h" | |
| 5 | |
| 6 typedef struct Inference_Bridge Inference_Bridge; | |
| 7 | |
| 8 typedef struct { | |
| 9 const char *type; | |
| 10 const char *request_id; | |
| 11 const char *conversation_id; | |
| 12 const char *delta; | |
| 13 const char *content; | |
| 14 const char *error_code; | |
| 15 const char *error_message; | |
| 16 int64 input_tokens; | |
| 17 int64 output_tokens; | |
| 18 boolean failed; | |
| 19 boolean aborted; | |
| 20 } Inference_Event; | |
| 21 | |
| 22 typedef void (*Inference_Event_Handler)( | |
| 23 const Inference_Event *p_event, | |
| 24 void *p_user_data); | |
| 25 | |
| 26 Inference_Bridge *Inference_Bridge_Create( | |
| 27 const char *sidecar_path, | |
| 28 const char *copilot_cli_path, | |
| 29 Inference_Event_Handler handler, | |
| 30 void *p_user_data); | |
| 31 | |
| 32 boolean Inference_Bridge_Start(Inference_Bridge *p_bridge); | |
| 33 boolean Inference_Bridge_Is_Ready(const Inference_Bridge *p_bridge); | |
| 34 | |
| 35 boolean Inference_Bridge_Start_Turn( | |
| 36 Inference_Bridge *p_bridge, | |
| 37 const char *request_id, | |
| 38 const char *conversation_id, | |
| 39 const char *prompt); | |
| 40 | |
| 41 boolean Inference_Bridge_Abort_Turn( | |
| 42 Inference_Bridge *p_bridge, | |
| 43 const char *request_id, | |
| 44 const char *conversation_id); | |
| 45 | |
| 46 boolean Inference_Bridge_Delete_Conversation( | |
| 47 Inference_Bridge *p_bridge, | |
| 48 const char *request_id, | |
| 49 const char *conversation_id); | |
| 50 | |
| 51 void Inference_Bridge_Destroy(Inference_Bridge *p_bridge); | |
| 52 | |
| 53 #endif |