gemini

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ChatMessageRoleSystem = "system"

Variables

This section is empty.

Functions

func GenGeminiClient

func GenGeminiClient() (*genai.Client, error)

Types

type ProxyRoundTripper

type ProxyRoundTripper struct {
	// APIKey is the API Key to set on requests.
	APIKey string

	// Transport is the underlying HTTP transport.
	// If nil, http.DefaultTransport is used.
	Transport http.RoundTripper

	ProxyURL string
}

func (*ProxyRoundTripper) RoundTrip

func (t *ProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(options *internal.Options) (*Source, error)

func (*Source) ChatGenerate

func (s *Source) ChatGenerate() (*internal.Result, error)

func (*Source) ListModels

func (s *Source) ListModels() (*internal.Result, error)

func (*Source) StreamChatGenerate

func (s *Source) StreamChatGenerate() (*internal.Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL