diff --git a/packages/inference/src/lib/getProviderHelper.ts b/packages/inference/src/lib/getProviderHelper.ts index 28e0eb2ad0..89f45f0e57 100644 --- a/packages/inference/src/lib/getProviderHelper.ts +++ b/packages/inference/src/lib/getProviderHelper.ts @@ -9,6 +9,7 @@ import * as Fireworks from "../providers/fireworks-ai.js"; import * as Groq from "../providers/groq.js"; import * as HFInference from "../providers/hf-inference.js"; import * as Hyperbolic from "../providers/hyperbolic.js"; +import * as Latitude from "../providers/latitude.js"; import * as Nebius from "../providers/nebius.js"; import * as Novita from "../providers/novita.js"; import * as Nscale from "../providers/nscale.js"; @@ -132,6 +133,10 @@ export const PROVIDERS: Record Latitude model ID here: + * + * https://huggingface.co/api/partners/latitude-sh/models + * + * This is a publicly available mapping. + * + * If you want to try to run inference for a new model locally before it's registered on huggingface.co, + * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes. + * + * - If you work at Latitude and want to update this mapping, please use the model mapping API we provide on huggingface.co + * - If you're a community member and want to add a new supported HF model to Latitude, please open an issue on the present repo + * and we will tag Latitude team members. + * + * Thanks! + */ + +import { BaseConversationalTask, BaseTextGenerationTask } from "./providerHelper.js"; + +export class LatitudeConversationalTask extends BaseConversationalTask { + constructor() { + super("latitude-sh", "https://api.lsh.ai"); + } +} + +export class LatitudeTextGenerationTask extends BaseTextGenerationTask { + constructor() { + super("latitude-sh", "https://api.lsh.ai"); + } +} diff --git a/packages/inference/src/types.ts b/packages/inference/src/types.ts index 1d41ce8c96..5924db32a7 100644 --- a/packages/inference/src/types.ts +++ b/packages/inference/src/types.ts @@ -56,6 +56,7 @@ export const INFERENCE_PROVIDERS = [ "groq", "hf-inference", "hyperbolic", + "latitude-sh", "nebius", "novita", "nscale", @@ -93,6 +94,7 @@ export const PROVIDERS_HUB_ORGS: Record = { groq: "groq", "hf-inference": "hf-inference", hyperbolic: "Hyperbolic", + "latitude-sh": "latitude-sh", nebius: "nebius", novita: "novita", nscale: "nscale",