@manta-eu/horns-server/studio-model
Reference for @manta-eu/horns-server/studio-model in @manta-eu/horns-server 0.2.3.
Type Aliases
StudioModelChoice
StudioModelChoice = {
model:LanguageModel;monitored:boolean;ok:true; } | {ok:false;reason:string; }
monitored says whether the call lands in the AI Gateway’s log.
StudioModelEnv
StudioModelEnv =
object
Properties
CLOUDFLARE_AI_GATEWAY_TOKEN?
optionalCLOUDFLARE_AI_GATEWAY_TOKEN?:string
CLOUDFLARE_ENV?
optionalCLOUDFLARE_ENV?:string
GOOGLE_VERTEX_LOCATION?
optionalGOOGLE_VERTEX_LOCATION?:string
GOOGLE_VERTEX_MODEL?
optionalGOOGLE_VERTEX_MODEL?:string
GOOGLE_VERTEX_PROJECT?
optionalGOOGLE_VERTEX_PROJECT?:string
HORNS_CRITIC_BASE_URL?
optionalHORNS_CRITIC_BASE_URL?:string
HORNS_CRITIC_MODEL?
optionalHORNS_CRITIC_MODEL?:string
HORNS_LLM_BASE_URL?
optionalHORNS_LLM_BASE_URL?:string
HORNS_LLM_MODEL?
optionalHORNS_LLM_MODEL?:string
VERTEX_SERVICE_ACCOUNT?
optionalVERTEX_SERVICE_ACCOUNT?:string
Variables
aiGatewayHost
constaiGatewayHost:"gateway.ai.cloudflare.com"="gateway.ai.cloudflare.com"
Functions
criticModel()
criticModel(
env,fetcher?):StudioModelChoice
The critic: its own route where one is named, the Studio’s own model otherwise. It judges a picture, so name a route where the Studio’s model has no image input.
Parameters
env
fetcher?
(input, init?) => Promise<Response>
Returns
studioModel()
studioModel(
env,fetcher?):StudioModelChoice
Vertex where a realm’s agreement bars the gateway, the gateway otherwise.
Parameters
env
fetcher?
(input, init?) => Promise<Response>