Skip to content

Commit

Permalink
Update test (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshineplan authored Jul 10, 2024
1 parent 35be93d commit 9aba1bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func testChat(ai ai.AI, prompt string) error {
return err
}
fmt.Println(resp.Results())
fmt.Println(resp.TokenCount())
fmt.Println("---")
return nil
}
Expand All @@ -44,6 +45,7 @@ func testChatStream(ai ai.AI, prompt string) error {
return err
}
fmt.Println(resp.Results())
fmt.Println(resp.TokenCount())
}
fmt.Println("---")
return nil
Expand Down Expand Up @@ -76,6 +78,7 @@ func testChatSession(ai ai.AI) error {
return err
}
fmt.Println(resp.Results())
fmt.Println(resp.TokenCount())
}
fmt.Println("---")
fmt.Println("History")
Expand All @@ -101,7 +104,7 @@ func TestGemini(t *testing.T) {
t.Fatal(err)
}
defer gemini.Close()
if err := testChat(gemini, "Who are you?"); err != nil {
if err := testChat(gemini, "Hello!"); err != nil {
t.Error(err)
}
if err := testChatStream(gemini, "Who am I?"); err != nil {
Expand Down

0 comments on commit 9aba1bf

Please sign in to comment.