Documentation
¶
Index ¶
- type BaseClient
- type Cache
- type Client
- type ClientInfo
- type ClientManager
- func (m *ClientManager) AddClient(endpoint string, client Client)
- func (m *ClientManager) GetAllEndpoints() []string
- func (m *ClientManager) GetAllNames() []string
- func (m *ClientManager) GetClientByEndpoint(endpoint string) (Client, error)
- func (m *ClientManager) GetClientByName(name string) (Client, error)
- type MemoryCache
- type OpenAIClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func NewBaseClient ¶
func NewBaseClient(info ClientInfo) *BaseClient
func (*BaseClient) GetClientInfo ¶
func (c *BaseClient) GetClientInfo() ClientInfo
type ClientInfo ¶
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
func NewClientManager ¶
func NewClientManager() *ClientManager
func (*ClientManager) AddClient ¶
func (m *ClientManager) AddClient(endpoint string, client Client)
func (*ClientManager) GetAllEndpoints ¶
func (m *ClientManager) GetAllEndpoints() []string
func (*ClientManager) GetAllNames ¶
func (m *ClientManager) GetAllNames() []string
func (*ClientManager) GetClientByEndpoint ¶
func (m *ClientManager) GetClientByEndpoint(endpoint string) (Client, error)
func (*ClientManager) GetClientByName ¶
func (m *ClientManager) GetClientByName(name string) (Client, error)
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func NewMemoryCache ¶
func NewMemoryCache(defaultExpiration, cleanupInterval time.Duration) *MemoryCache
type OpenAIClient ¶
type OpenAIClient struct {
BaseClient
// contains filtered or unexported fields
}
func NewOpenAIClient ¶
func NewOpenAIClient(info ClientInfo, apiKey string) *OpenAIClient
func (*OpenAIClient) GetClientInfo ¶
func (c *OpenAIClient) GetClientInfo() ClientInfo
Click to show internal directories.
Click to hide internal directories.