Skip to content

Commit

Permalink
Fix documentation (#58)
Browse files Browse the repository at this point in the history
Fixed minor typos and inconsistencies in the comments of
client.go and embed.go.
  • Loading branch information
kasugamirai authored Mar 1, 2024
1 parent 0bb2e23 commit 90f89ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion genai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (e *BlockedError) Error() string {
return b.String()
}

// joinResponses merges the two responses, which should be the result of a streaming call.
// joinResponses merges the two responses, which should be the result of a streaming call.
// The first argument is modified.
func joinResponses(dest, src *GenerateContentResponse) *GenerateContentResponse {
if dest == nil {
Expand Down
2 changes: 2 additions & 0 deletions genai/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ func printValue(v reflect.Value, indent, first string, printf func(string, ...an
printValue(vf, indent1, sf.Name+": ", printf)
}
}
default:
panic("unhandled default case")
}
printf("%s}\n", indent)
case reflect.Pointer, reflect.Interface:
Expand Down
2 changes: 1 addition & 1 deletion genai/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type EmbeddingBatch struct {
}

// NewBatch returns a new, empty EmbeddingBatch with the same TaskType as the model.
// Make multiple calls to [EmbeddingBatch.AddContent] or EmbeddingBatch.AddContentWithTitle].
// Make multiple calls to [EmbeddingBatch.AddContent] or [EmbeddingBatch.AddContentWithTitle].
// Then pass the EmbeddingBatch to [EmbeddingModel.BatchEmbedContents] to get
// all the embeddings in a single call to the model.
func (m *EmbeddingModel) NewBatch() *EmbeddingBatch {
Expand Down

0 comments on commit 90f89ab

Please sign in to comment.