summaryrefslogtreecommitdiff
path: root/make_chat.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-21 00:28:33 -0500
committerJeff Carr <[email protected]>2025-08-21 00:28:33 -0500
commitcdcd0fe38e50ef992de8e590fb5c3b0b4992722e (patch)
treed5b3861b29abbd9ed69ef6688a114c3635df0b0a /make_chat.go
day1
Diffstat (limited to 'make_chat.go')
-rw-r--r--make_chat.go60
1 files changed, 60 insertions, 0 deletions
diff --git a/make_chat.go b/make_chat.go
new file mode 100644
index 0000000..26c4ea3
--- /dev/null
+++ b/make_chat.go
@@ -0,0 +1,60 @@
+package chatpb
+
+import "go.wit.com/log"
+
+func TestChat() {
+ conversation := NewChats()
+
+ chat := new(Chat)
+ chat.Content = "this was fun"
+
+ t := new(Table)
+ t.Columns = 4
+ // t.Rows = append(t.Rows, []string{"a", "b"})
+ chat.Table = t
+
+ r := new(Row)
+ r.Fields = []string{"a", "b"}
+ t.Rows = append(t.Rows, r)
+
+ r = new(Row)
+ r.Fields = []string{"1", "", "2", "3"}
+ t.Rows = append(t.Rows, r)
+
+ conversation.Append(chat)
+
+ conversation.AddGeminiComment("I like astronomy")
+
+ dump := conversation.FormatTEXT()
+
+ log.Println(dump)
+}
+
+func (c *Chats) AddTable() {
+ chat := new(Chat)
+
+ t := new(Table)
+ t.Columns = 4
+ // t.Rows = append(t.Rows, []string{"a", "b"})
+
+ r := new(Row)
+ r.Fields = []string{"a", "b"}
+ t.Rows = append(t.Rows, r)
+
+ r = new(Row)
+ r.Fields = []string{"1", "", "2", "3"}
+ t.Rows = append(t.Rows, r)
+
+ chat.Table = t
+
+ c.Append(chat)
+}
+
+func (c *Chats) AddGeminiComment(s string) {
+ chat := new(Chat)
+
+ chat.Gemini = true
+ chat.Content = s
+
+ c.Append(chat)
+}