Retain OpenAI Responses and Chat Completions with streaming and fallback. Use native Anthropic Messages with tools, thinking and streaming support. Remove other model providers and SDKs while preserving speech services. Update configuration and docs; verify all Go tests, vet, lint and Linux build.
34 lines
867 B
Go
34 lines
867 B
Go
package providers
|
|
|
|
import httpapi "github.com/sipeed/picoclaw/pkg/providers/httpapi"
|
|
|
|
type (
|
|
HTTPProvider = httpapi.HTTPProvider
|
|
)
|
|
|
|
func NewHTTPProvider(apiKey, apiBase, proxy string) *HTTPProvider {
|
|
return httpapi.NewHTTPProvider(apiKey, apiBase, proxy)
|
|
}
|
|
|
|
func NewHTTPProviderWithMaxTokensField(apiKey, apiBase, proxy, maxTokensField string) *HTTPProvider {
|
|
return httpapi.NewHTTPProviderWithMaxTokensField(apiKey, apiBase, proxy, maxTokensField)
|
|
}
|
|
|
|
func NewHTTPProviderWithMaxTokensFieldAndRequestTimeout(
|
|
apiKey, apiBase, proxy, maxTokensField, userAgent string,
|
|
requestTimeoutSeconds int,
|
|
extraBody map[string]any,
|
|
customHeaders map[string]string,
|
|
) *HTTPProvider {
|
|
return httpapi.NewHTTPProviderWithMaxTokensFieldAndRequestTimeout(
|
|
apiKey,
|
|
apiBase,
|
|
proxy,
|
|
maxTokensField,
|
|
userAgent,
|
|
requestTimeoutSeconds,
|
|
extraBody,
|
|
customHeaders,
|
|
)
|
|
}
|