Methods
run
- run(model, inputs, options?): Promise<AiTextClassificationOutput>
Parameters
- model: "@cf/huggingface/distilbert-sst-2-int8" | "@cf/jpmorganchase/roberta-spam" | "@cf/inml/inml-roberta-dga"
- inputs: AiTextClassificationInput
Optional
options: AiOptions
- run(model, inputs, options?): Promise<Uint8Array>
Parameters
- model: "@cf/stabilityai/stable-diffusion-xl-base-1.0" | "@cf/runwayml/stable-diffusion-v1-5-inpainting" | "@cf/runwayml/stable-diffusion-v1-5-img2img" | "@cf/lykon/dreamshaper-8-lcm" | "@cf/bytedance/stable-diffusion-xl-lightning"
- inputs: AiTextToImageInput
Optional
options: AiOptions
Returns Promise<Uint8Array>
- run(model, inputs, options?): Promise<AiSentenceSimilarityOutput>
- run(model, inputs, options?): Promise<AiTextEmbeddingsOutput>
Parameters
- model: "@cf/baai/bge-small-en-v1.5" | "@cf/baai/bge-base-en-v1.5" | "@cf/baai/bge-large-en-v1.5"
- inputs: AiTextEmbeddingsInput
Optional
options: AiOptions
- run(model, inputs, options?): Promise<AiSpeechRecognitionOutput>
- run(model, inputs, options?): Promise<AiImageClassificationOutput>
- run(model, inputs, options?): Promise<AiObjectDetectionOutput>
- run(model, inputs, options?): Promise<AiTextGenerationOutput>
Parameters
- model: "@cf/meta/llama-3-8b-instruct" | "@cf/meta/llama-2-7b-chat-int8" | "@cf/mistral/mistral-7b-instruct-v0.1" | "@cf/mistral/mistral-7b-instruct-v0.1-vllm" | "@cf/mistral/mistral-7b-instruct-v0.2-lora" | "@cf/meta/llama-2-7b-chat-fp16" | "@hf/thebloke/llama-2-13b-chat-awq" | "@hf/thebloke/zephyr-7b-beta-awq" | "@hf/thebloke/mistral-7b-instruct-v0.1-awq" | "@hf/thebloke/codellama-7b-instruct-awq" | "@hf/thebloke/openchat_3.5-awq" | "@hf/thebloke/openhermes-2.5-mistral-7b-awq" | "@hf/thebloke/neural-chat-7b-v3-1-awq" | "@hf/thebloke/llamaguard-7b-awq" | "@hf/thebloke/deepseek-coder-6.7b-base-awq" | "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" | "@hf/nousresearch/hermes-2-pro-mistral-7b" | "@hf/mistral/mistral-7b-instruct-v0.2" | "@cf/mistral/mixtral-8x7b-instruct-v0.1-awq" | "@hf/google/gemma-7b-it" | "@hf/nexusflow/starling-lm-7b-beta" | "@cf/deepseek-ai/deepseek-math-7b-instruct" | "@cf/defog/sqlcoder-7b-2" | "@cf/openchat/openchat-3.5-0106" | "@cf/tiiuae/falcon-7b-instruct" | "@cf/thebloke/discolm-german-7b-v1-awq" | "@cf/qwen/qwen1.5-0.5b-chat" | "@cf/qwen/qwen1.5-1.8b-chat" | "@cf/qwen/qwen1.5-7b-chat-awq" | "@cf/qwen/qwen1.5-14b-chat-awq" | "@cf/tinyllama/tinyllama-1.1b-chat-v1.0" | "@cf/microsoft/phi-2" | "@cf/google/gemma-2b-it-lora" | "@cf/google/gemma-7b-it-lora" | "@cf/meta-llama/llama-2-7b-chat-hf-lora"
- inputs: AiTextGenerationInput
Optional
options: AiOptions
- run(model, inputs, options?): Promise<AiTranslationOutput>
- run(model, inputs, options?): Promise<AiSummarizationOutput>
- run(model, inputs, options?): Promise<AiImageToTextOutput>