brk-code

generative-ai-python の API リファレンス

generative-ai-python (google/generative-ai-python) の公開 API 65 件 —— クラス 38、関数 12、メソッド 15。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: google/generative-ai-python

種別件数
クラス38
関数12
メソッド15

API 一覧

classgoogle.generativeai.caching.CachedContent
Cached content resource.
methodgoogle.generativeai.caching.CachedContent.delete() -> None
Deletes `CachedContent` resource.
methodgoogle.generativeai.caching.CachedContent.get(name:str) -> CachedContent
Fetches required `CachedContent` resource.
methodgoogle.generativeai.caching.CachedContent.list(page_size:Optional[int]=1) -> Iterable[CachedContent]
Lists `CachedContent` objects associated with the project.
classgoogle.generativeai.generative_models.ChatSession
Contains an ongoing conversation with the model.
methodgoogle.generativeai.generative_models.ChatSession.history() -> list[protos.Content]
The chat history.
classgoogle.generativeai.notebook.argument_parser.ArgumentParser
Customized ArgumentParser for LLM Magics.
classgoogle.generativeai.notebook.argument_parser.ParserError
Exception thrown when there is an error.
classgoogle.generativeai.notebook.argument_parser.ParserNormalExit
Exception thrown when the parser exits normally.
classgoogle.generativeai.notebook.cmd_line_parser.CmdLineParser
Implementation of Magics command line parser.
classgoogle.generativeai.notebook.compare_cmd.CompareCommand
Implementation of "compare" command.
classgoogle.generativeai.notebook.compile_cmd.CompileCommand
Implementation of the "compile" command.
classgoogle.generativeai.notebook.eval_cmd.EvalCommand
Implementation of "eval" command.
classgoogle.generativeai.notebook.flag_def.BooleanFlagDef
Definition for a Boolean flag.
classgoogle.generativeai.notebook.flag_def.FlagDef
Abstract base class for flag definitions.
methodgoogle.generativeai.notebook.flag_def.FlagDef.add_argument_to_parser(parser:argparse.ArgumentParser) -> None
Adds this flag as an argument to `parser`.
classgoogle.generativeai.notebook.flag_def.MultiValuesFlagDef
Definition for a flag that takes multiple values.
classgoogle.generativeai.notebook.flag_def.SingleValueFlagDef
Definition for a flag that takes a single value.
classgoogle.generativeai.notebook.gspread_client.GSpreadClient
Wrapper around gspread.client.Client.
classgoogle.generativeai.notebook.gspread_client.GSpreadClientImpl
Concrete implementation of GSpreadClient.
classgoogle.generativeai.notebook.gspread_client.NullGSpreadClient
Null-object implementation of GSpreadClient.
funcgoogle.generativeai.notebook.gspread_client.authorize(creds:credentials.Credentials, env:ipython_env.IPythonEnv | None) -> None
Sets up credential for gspreads.
funcgoogle.generativeai.notebook.gspread_client.testonly_set_client(client:GSpreadClient) -> None
Overrides the global client for testing.
funcgoogle.generativeai.notebook.html_utils.get_anchor_tag(url:sheets_id.SheetsURL, text:str) -> str
Returns a HTML string representing an anchor tag.
classgoogle.generativeai.notebook.ipython_env_impl.IPythonEnvImpl
Concrete implementation of IPythonEnv.
classgoogle.generativeai.notebook.lib.llm_function.LLMCompareFunction
LLMFunction for comparisons.
classgoogle.generativeai.notebook.lib.llmfn_output_row.LLMFnOutputRowView
Immutable view of LLMFnOutputRow.
methodgoogle.generativeai.notebook.lib.llmfn_output_row.LLMFnOutputRowView.result_key() -> str
Get the key of the result cell.
methodgoogle.generativeai.notebook.lib.llmfn_output_row.LLMFnOutputRowView.result_value() -> Any
Get the value of the result cell.
classgoogle.generativeai.notebook.lib.llmfn_outputs.LLMFnOutputs
A sequence of LLMFnOutputEntry instances.
methodgoogle.generativeai.notebook.lib.llmfn_outputs.LLMFnOutputs.export(sink:LLMFnOutputsSink) -> None
Export contents to `sink`.
classgoogle.generativeai.notebook.lib.llmfn_outputs.LLMFnOutputsBase
Parent class for LLMFnOutputs.
methodgoogle.generativeai.notebook.lib.llmfn_outputs.LLMFnOutputsBase.as_dict() -> Mapping[str, Sequence[Any]]
Formats returned results as dictionary.
classgoogle.generativeai.notebook.lib.model.EchoModel
Model that returns the original input.
classgoogle.generativeai.notebook.lib.model.ModelArguments
Common arguments for models.
classgoogle.generativeai.notebook.lib.model.ModelResults
Results from calling AbstractModel.call_model().
funcgoogle.generativeai.notebook.lib.prompt_utils.get_placeholders(prompt:str) -> AbstractSet[str]
Returns the placeholders for `prompt`.
classgoogle.generativeai.notebook.magics.AbstractMagics
Defines interface to Magics class.
classgoogle.generativeai.notebook.magics.Magics
Class to register the magic with Colab.
methodgoogle.generativeai.notebook.magics.Magics.get_instance() -> AbstractMagics
Retrieve global instance of the Magics object.
classgoogle.generativeai.notebook.magics.MagicsImpl
Actual class implementing the magics functionality.
funcgoogle.generativeai.notebook.magics.authorize(creds:credentials.Credentials) -> None
Sets up credentials.
classgoogle.generativeai.notebook.magics_engine.MagicsEngine
Implementation of functionality used by Magics.
classgoogle.generativeai.notebook.model_registry.ModelRegistry
Registry that instantiates and caches models.
funcgoogle.generativeai.notebook.output_utils.write_to_outputs(results:llmfn_outputs.LLMFnOutputs, parsed_args:parsed_args_lib.ParsedArgs) -> None
Writes `results` to the sinks provided.
classgoogle.generativeai.notebook.parsed_args_lib.ParsedArgs
The results of parsing the command line.
classgoogle.generativeai.notebook.post_process_utils.PostProcessParseError
An error parsing the post-processing tokens.
funcgoogle.generativeai.notebook.py_utils.get_py_var(var_name:str) -> Any
Retrieves the value of `var_name` from the global environment.
funcgoogle.generativeai.notebook.py_utils.set_py_var(var_name:str, val:Any) -> None
Sets the value of `var_name` in the global environment.
funcgoogle.generativeai.notebook.py_utils.validate_var_name(var_name:str) -> None
Validates that the variable name is a valid identifier.
classgoogle.generativeai.notebook.run_cmd.RunCommand
Implementation of the "run" command.
funcgoogle.generativeai.notebook.sheets_sanitize_url.sanitize_sheets_url(url:str) -> str
Sanitize a Sheets URL.
classgoogle.generativeai.notebook.sheets_utils.SheetsInputs
Inputs to an LLMFunction from Google Sheets.
funcgoogle.generativeai.operations.get_operation(name:str, *client=None) -> CreateTunedModelOperation
Calls the API to get a specific operation
funcgoogle.generativeai.operations.list_operations(*client=None) -> Iterator[CreateTunedModelOperation]
Calls the API to list all operations
classgoogle.generativeai.types.model_types.Model
A dataclass representation of a `protos.Model`.
classgoogle.generativeai.types.model_types.TunedModel
A dataclass representation of a `protos.TunedModel`.
classgoogle.generativeai.types.permission_types.Permission
A permission to access a resource.
methodgoogle.generativeai.types.permission_types.Permission.delete(client:glm.PermissionServiceClient | None=None) -> None
Delete permission (self).
methodgoogle.generativeai.types.permission_types.Permission.get(name:str, client:glm.PermissionServiceClient | None=None) -> Permission
Get information about a specific permission.
methodgoogle.generativeai.types.permission_types.Permissions.get(name:str) -> Permission
Get information about a specific permission.
methodgoogle.generativeai.types.permission_types.Permissions.get_async(name:str) -> Permission
Get information about a specific permission.
classgoogle.generativeai.types.retriever_types.Corpus
A `Corpus` is a collection of `Documents`.
classgoogle.generativeai.types.retriever_types.Document
A `Document` is a collection of `Chunk`s.
methodgoogle.generativeai.types.retriever_types.Document.list_chunks(page_size:int | None=None, client:glm.RetrieverServiceClient | None=None, request_options:helper_types.RequestOptionsType | None=None) -> Iterable[Chunk]
List chunks of a document.

この情報について

掲載しているシグネチャは google/generative-ai-python の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る