summaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
Diffstat (limited to 'example.go')
-rw-r--r--example.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/example.go b/example.go
new file mode 100644
index 0000000..d22f39c
--- /dev/null
+++ b/example.go
@@ -0,0 +1,22 @@
+package chatpb
+
+import (
+ "go.wit.com/log"
+)
+
+func ExampleChat() *Chats {
+ conversation := NewChats()
+
+ t := conversation.AddTable()
+ t.AddRow([]string{"apple", "pear"})
+
+ conversation.AddGeminiComment("funny")
+ conversation.AddUserComment("yes")
+
+ conversation.AddGeminiComment("I like astronomy")
+
+ dump := conversation.FormatTEXT()
+
+ log.Println(dump)
+ return conversation
+}