Skip to content

Commit

Permalink
don't add comment about mime
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Jul 18, 2024
1 parent d6851df commit 79582cc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions genai/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func uploadFile(ctx context.Context, client *genai.Client, path string) (*genai.
}
defer osf.Close()

// The service detects the MIME type of uploaded data automatically, but
// sometimes we have to specify it manually. One example is when text/* MIME
// types are considered (as it may be difficult to automatically detect the
// exact sub-type of a text file).
opts := &genai.UploadFileOptions{}
if filepath.Ext(path) == ".txt" {
opts.MIMEType = "text/plain"
Expand Down
4 changes: 0 additions & 4 deletions genai/internal/samples/docs-snippets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func uploadFile(ctx context.Context, client *genai.Client, path string) (*genai.
}
defer osf.Close()

// The service detects the MIME type of uploaded data automatically, but
// sometimes we have to specify it manually. One example is when text/* MIME
// types are considered (as it may be difficult to automatically detect the
// exact sub-type of a text file).
opts := &genai.UploadFileOptions{}
if filepath.Ext(path) == ".txt" {
opts.MIMEType = "text/plain"
Expand Down

0 comments on commit 79582cc

Please sign in to comment.