mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 17:14:21 +01:00
dave: cleanly separate ui from logic
This is a good demo of how easy it is to build a notedeck app, so let's detangle the ui from logic to showcase this Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -4,16 +4,16 @@ use nostrdb::{Ndb, Transaction};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Message {
|
||||
System(String),
|
||||
User(String),
|
||||
Assistant(String),
|
||||
System(String),
|
||||
ToolCalls(Vec<ToolCall>),
|
||||
ToolResponse(ToolResponse),
|
||||
}
|
||||
|
||||
/// The ai backends response. Since we are using streaming APIs these are
|
||||
/// represented as individual tokens or tool calls
|
||||
pub enum DaveResponse {
|
||||
pub enum DaveApiResponse {
|
||||
ToolCalls(Vec<ToolCall>),
|
||||
Token(String),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user