% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/provider-google-upload.R
\name{google_upload}
\alias{google_upload}
\title{Upload a file to gemini}
\usage{
google_upload(
  path,
  base_url = "https://generativelanguage.googleapis.com/",
  api_key = NULL,
  credentials = NULL,
  mime_type = NULL
)
}
\arguments{
\item{path}{Path to a file to upload.}

\item{base_url}{The base URL to the API endpoint.}

\item{api_key}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{credentials} instead.}

\item{credentials}{A function that returns a list of authentication headers
or \code{NULL}, the default, to use ambient credentials. See above for details.}

\item{mime_type}{Optionally, specify the mime type of the file.
If not specified, will be guessed from the file extension.}
}
\value{
A \verb{<ContentUploaded>} object that can be passed to \verb{$chat()}.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}

This function is deprecated in favour of the provider-neutral \link{Chat}
method \code{chat$file_upload()}.
}
\examples{
\dontrun{
chat <- chat_google_gemini()
file <- chat$file_upload("path/to/file.pdf")
chat$chat(file, "Give me a three paragraph summary of this PDF")
}
}
