MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / buildExecutorRequest

Function buildExecutorRequest

internal/pluginhost/adapters.go:2046–2065  ·  view source on GitHub ↗
(host *Host, provider string, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options)

Source from the content-addressed store, hash-verified

2044}
2045
2046func buildExecutorRequest(host *Host, provider string, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options) pluginapi.ExecutorRequest {
2047 return pluginapi.ExecutorRequest{
2048 AuthID: authID(auth),
2049 AuthProvider: authProvider(auth),
2050 Model: req.Model,
2051 Format: req.Format.String(),
2052 Stream: opts.Stream,
2053 Alt: opts.Alt,
2054 Headers: cloneHeader(opts.Headers),
2055 Query: cloneValues(opts.Query),
2056 OriginalRequest: bytes.Clone(opts.OriginalRequest),
2057 SourceFormat: opts.SourceFormat.String(),
2058 Payload: bytes.Clone(req.Payload),
2059 Metadata: mergeExecutorMetadata(req.Metadata, opts.Metadata),
2060 StorageJSON: storageJSONFromAuth(auth),
2061 AuthMetadata: cloneAnyMap(authMetadata(auth)),
2062 AuthAttributes: authAttributes(auth),
2063 HTTPClient: host.newHTTPClient(auth, provider),
2064 }
2065}
2066
2067func storageJSONFromAuth(auth *coreauth.Auth) []byte {
2068 if auth == nil {

Callers 3

ExecuteMethod · 0.85
ExecuteStreamMethod · 0.85
CountTokensMethod · 0.85

Calls 12

authIDFunction · 0.85
authProviderFunction · 0.85
mergeExecutorMetadataFunction · 0.85
storageJSONFromAuthFunction · 0.85
cloneAnyMapFunction · 0.85
authMetadataFunction · 0.85
newHTTPClientMethod · 0.80
cloneHeaderFunction · 0.70
cloneValuesFunction · 0.70
authAttributesFunction · 0.70
StringMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected