Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) APIKey() string
- func (c *Client) AuxDeclares(flag string) bool
- func (c *Client) BaseURL() string
- func (c *Client) Close() error
- func (c *Client) CreateChatCompletion(ctx context.Context, kwargs map[string]any) (any, error)
- func (c *Client) DefaultHeaders() map[string]string
- func (c *Client) IsClosed() bool
- func (c *Client) ListModels(ctx context.Context, timeoutSeconds float64) ([]string, error)
- type Error
- type Options
- type Vendor
Constants ¶
const CopilotMarkerBaseURL = "acp://copilot"
Marker base URL the former Copilot alias exported as ACP_MARKER_BASE_URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Vendor
// contains filtered or unexported fields
}
OpenAI client shaped facade over one ACP agent CLI spoken to on stdio
func New ¶
Client with resolved command, args and workspace cwd, env overrides of the vendor winning over its defaults
func (*Client) APIKey ¶
Key reported to callers, the vendor's session default model id when none was passed
func (*Client) AuxDeclares ¶
A complete async safe client the auxiliary wraps never redispatch through a wire adapter
func (*Client) BaseURL ¶
Base url reported to callers, the never dialled acp marker when none was passed
func (*Client) CreateChatCompletion ¶
Answers OpenAI chat kwargs through one ACP prompt, a completion map or its chunk stream when stream is set
func (*Client) DefaultHeaders ¶
Headers the caller passed at construction
type Error ¶
Python exception raised by the ACP client, Kind naming its class
func (*Error) PyTypeName ¶
Python exception class name the error stands for
type Options ¶
type Options struct {
APIKey string
BaseURL string
DefaultHeaders map[string]string
ACPCommand string
ACPArgs []string
ACPCwd string
Command string
Args []string
Env *tools.Env
}
Constructor keywords of the client, empty values falling back to the vendor defaults
type Vendor ¶
type Vendor struct {
DefaultCommand string
DefaultArgs []string
CommandEnvVars []string
ArgsEnvVar string
MarkerBaseURL string
PlaceholderModel string
Label string
MissingCommandHint string
AuthRequiredHint *string
UnsupportedTransportHint string
ModelEntryDisabled func(entry any) (bool, error)
EarlyExitError func(stderrText string) (string, bool)
}
Launch defaults, labels and vendor hooks a provider customises
func BaseVendor ¶
func BaseVendor() Vendor
Vendor carrying the generic base defaults every provider starts from