Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/data/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@
"object": "provider",
"description": "Dashscope provides intelligent analytics solutions designed to help businesses visualize and interpret complex data effectively. Their platform integrates advanced machine learning algorithms to generate real-time insights from diverse datasets, enabling organizations to make informed decisions quickly. Dashscope focuses on enhancing data accessibility and usability, empowering teams to leverage analytics for strategic planning and operational efficiency.",
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1"
},
{
"id": "crusoe",
"name": "Crusoe",
"object": "provider",
"description": "Crusoe Cloud provides managed inference for open-weight AI models on sustainable, energy-efficient data centers. Their OpenAI-compatible API offers access to leading open-source models such as Llama, DeepSeek, and Qwen, with a focus on high performance and reliability.",
"base_url": "https://api.inference.crusoecloud.com/v1"
}
]
}
2 changes: 2 additions & 0 deletions src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export const ORACLE: string = 'oracle';
export const IO_INTELLIGENCE: string = 'iointelligence';
export const AIBADGR: string = 'aibadgr';
export const OVHCLOUD: string = 'ovhcloud';
export const CRUSOE: string = 'crusoe';

export const VALID_PROVIDERS = [
ANTHROPIC,
Expand Down Expand Up @@ -189,6 +190,7 @@ export const VALID_PROVIDERS = [
IO_INTELLIGENCE,
AIBADGR,
OVHCLOUD,
CRUSOE,
];

export const CONTENT_TYPES = {
Expand Down
24 changes: 24 additions & 0 deletions src/providers/crusoe/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ProviderAPIConfig } from '../types';

export const CrusoeAPIConfig: ProviderAPIConfig = {
getBaseURL: () => 'https://api.inference.crusoecloud.com/v1',
headers({ providerOptions }) {
const { apiKey } = providerOptions;
const headers = {
Authorization: `Bearer ${apiKey}`,
};
return headers;
},
getEndpoint({ fn }) {
switch (fn) {
case 'chatComplete': {
return '/chat/completions';
}
case 'complete': {
return '/completions';
}
default:
return '';
}
},
};
22 changes: 22 additions & 0 deletions src/providers/crusoe/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { CRUSOE } from '../../globals';
import {
chatCompleteParams,
completeParams,
responseTransformers,
} from '../open-ai-base';
import { ProviderConfigs } from '../types';
import { CrusoeAPIConfig } from './api';

export const CrusoeProviderConfig: ProviderConfigs = {
chatComplete: chatCompleteParams([], {
model: 'meta-llama/Llama-3.3-70B-Instruct',
}),
complete: completeParams([], {
model: 'meta-llama/Llama-3.3-70B-Instruct',
}),
api: CrusoeAPIConfig,
responseTransforms: responseTransformers(CRUSOE, {
chatComplete: true,
complete: true,
}),
};
4 changes: 3 additions & 1 deletion src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { InferenceNetProviderConfigs } from './inference-net';
import SambaNovaConfig from './sambanova';
import LemonfoxAIConfig from './lemonfox-ai';
import { UpstageConfig } from './upstage';
import { LAMBDA } from '../globals';
import { LAMBDA, CRUSOE } from '../globals';
import { LambdaProviderConfig } from './lambda';
import { DashScopeConfig } from './dashscope';
import XAIConfig from './x-ai';
Expand Down Expand Up @@ -74,6 +74,7 @@ import OracleConfig from './oracle';
import IOIntelligenceConfig from './iointelligence';
import AIBadgrConfig from './aibadgr';
import OVHcloudConfig from './ovhcloud';
import { CrusoeProviderConfig } from './crusoe';

const Providers: { [key: string]: ProviderConfigs } = {
openai: OpenAIConfig,
Expand Down Expand Up @@ -148,6 +149,7 @@ const Providers: { [key: string]: ProviderConfigs } = {
iointelligence: IOIntelligenceConfig,
aibadgr: AIBadgrConfig,
ovhcloud: OVHcloudConfig,
[CRUSOE]: CrusoeProviderConfig,
};

export default Providers;