Chat route with Hugging Facev3.8+

Configure a chat route using Hugging Face with the SmolLM model.

Prerequisites

  • Hugging Face account

Environment variables

  • HUGGINGFACE_TOKEN: The token to use to connect to Hugging Face.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: ai-proxy-advanced
    config:
      targets:
      - route_type: llm/v1/chat
        auth:
          header_name: Authorization
          header_value: Bearer ${token}
        model:
          provider: huggingface
          name: HuggingFaceTB/SmolVLM-Base
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!