Defines and manages supported AI server types for model discovery and request handling. Use this to standardize server profiles across your AI integration layer.
// Source: https://github.com/a-ghorbani/pocketpal-ai | License: MIT | Copyright 2024 Asghar Ghorbani // Provided via justclaw.it.com; keep this notice with the code. /** * User-selectable server types. Selects the server's profile (`api/servers/`, * one per type): its sampler send names, its request body beyond the * transport's own keys, its final-chunk reading, its models-list row parsing * and its discovery flags. detectServerType seeds the value best-effort; the * user's selection wins. */ export const SERVER_TYPE_OPTIONS = [ 'llama.cpp', 'LM Studio', 'Ollama', 'OpenAI', 'vLLM', 'unknown', ] as const; export type ServerTypeOption = (typeof SERVER_TYPE_OPTIONS)[number]; export type ServerType = ServerTypeOption; /** * Persisted records are not type-checked on hydr ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key