ProviderFactoryOptions
Defined in: eval/src/provider-setup.ts:23
Options of createProviderFactory.
Extends
Properties
allowedHosts?
optionalallowedHosts?: readonlystring[]
Defined in: eval/src/provider-setup.ts:29
Hosts allowed besides the built-in defaults, from --allow-host
allowLocal?
optionalallowLocal?:boolean
Defined in: eval/src/provider-setup.ts:31
Allow loopback hosts and plain http for them, from --allow-local
config?
optionalconfig?:EvalConfig
Defined in: eval/src/provider-setup.ts:25
The eval section of promptscript.yaml
env
env:
Readonly<Record<string,string|undefined>>
Defined in: eval/src/provider-setup.ts:27
Environment the key variables are read from, at call time
fetch?
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: eval/src/http-provider.ts:35
Fetch to use instead of the global one
Parameters
input
string | URL | Request
init?
RequestInit
Returns
Promise<Response>
Inherited from
onUse?
optionalonUse?: (use) =>void
Defined in: eval/src/provider-setup.ts:37
Called once per provider before it is used, so the CLI can print where the
key goes. The config names the variable in apiKeyEnvVar, so it decides
which secret of the environment is sent: review that key like code.
Parameters
use
Returns
void