MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / newProviderUri

Function newProviderUri

ai-provider/model-runtime/provider.go:401–418  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

399}
400
401func newProviderUri(addr string) (IProviderURI, error) {
402 uri, err := url.Parse(addr)
403 if err != nil {
404 return nil, err
405 }
406 if uri.Host == "" {
407 return nil, fmt.Errorf("host is empty")
408 }
409 if uri.Scheme == "" {
410 return nil, fmt.Errorf("scheme is empty")
411 }
412
413 return &providerUri{
414 scheme: uri.Scheme,
415 host: uri.Host,
416 path: uri.Path,
417 }, nil
418}
419
420func (p *providerUri) Scheme() string {
421 return p.scheme

Callers 2

GetCustomizeProviderURIFunction · 0.85
NewProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected