Skip to content

Commit

Permalink
genai: adjust uploadFile comment in examples (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben authored Jul 26, 2024
1 parent a0252ef commit 12dc289
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions genai/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ var testDataDir = filepath.Join(testhelpers.ModuleRootDir(), "genai", "testdata"

// uploadFile uploads the given file to the service, and returns a [genai.File]
// representing it. mimeType optionally specifies the MIME type of the data in
// the file; if set to "", the service will try to automatically determine the
// type from the data contents.
// the file; if empty, the service will attempt to infer it from the file
// contents; for ambiguous file types (e.g. text files), it is recommended to
// explicitly specify the MIME type.
//
// To clean up the file, defer a client.DeleteFile(ctx, file.Name)
// call when a file is successfully returned. file.Name will be a uniqely
// generated string to identify the file on the service.
Expand Down
6 changes: 4 additions & 2 deletions genai/internal/samples/docs-snippets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ var testDataDir = filepath.Join(testhelpers.ModuleRootDir(), "genai", "testdata"

// uploadFile uploads the given file to the service, and returns a [genai.File]
// representing it. mimeType optionally specifies the MIME type of the data in
// the file; if set to "", the service will try to automatically determine the
// type from the data contents.
// the file; if empty, the service will attempt to infer it from the file
// contents; for ambiguous file types (e.g. text files), it is recommended to
// explicitly specify the MIME type.
//
// To clean up the file, defer a client.DeleteFile(ctx, file.Name)
// call when a file is successfully returned. file.Name will be a uniqely
// generated string to identify the file on the service.
Expand Down

0 comments on commit 12dc289

Please sign in to comment.