File tree 4 files changed +48
-0
lines changed
4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export const LAMBDA: string = 'lambda';
76
76
export const DASHSCOPE : string = 'dashscope' ;
77
77
export const X_AI : string = 'x-ai' ;
78
78
export const SAGEMAKER : string = 'sagemaker' ;
79
+ export const NEBIUS : string = 'nebius' ;
79
80
80
81
export const VALID_PROVIDERS = [
81
82
ANTHROPIC ,
@@ -125,6 +126,7 @@ export const VALID_PROVIDERS = [
125
126
DASHSCOPE ,
126
127
X_AI ,
127
128
SAGEMAKER ,
129
+ NEBIUS ,
128
130
] ;
129
131
130
132
export const CONTENT_TYPES = {
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import { DashScopeConfig } from './dashscope';
50
50
import XAIConfig from './x-ai' ;
51
51
import QdrantConfig from './qdrant' ;
52
52
import SagemakerConfig from './sagemaker' ;
53
+ import NebiusConfig from './nebius' ;
53
54
54
55
const Providers : { [ key : string ] : ProviderConfigs } = {
55
56
openai : OpenAIConfig ,
@@ -100,6 +101,7 @@ const Providers: { [key: string]: ProviderConfigs } = {
100
101
'x-ai' : XAIConfig ,
101
102
qdrant : QdrantConfig ,
102
103
sagemaker : SagemakerConfig ,
104
+ nebius : NebiusConfig ,
103
105
} ;
104
106
105
107
export default Providers ;
Original file line number Diff line number Diff line change
1
+ import { ProviderAPIConfig } from '../types' ;
2
+
3
+ export const nebiusAPIConfig : ProviderAPIConfig = {
4
+ getBaseURL : ( ) => 'https://api.studio.nebius.ai/v1' ,
5
+ headers ( { providerOptions } ) {
6
+ const { apiKey } = providerOptions ;
7
+ return { Authorization : `Bearer ${ apiKey } ` } ;
8
+ } ,
9
+ getEndpoint ( { fn } ) {
10
+ switch ( fn ) {
11
+ case 'chatComplete' :
12
+ return `/chat/completions` ;
13
+ case 'embed' :
14
+ return `/embeddings` ;
15
+ case 'complete' :
16
+ return '/completions' ;
17
+ default :
18
+ return '' ;
19
+ }
20
+ } ,
21
+ } ;
Original file line number Diff line number Diff line change
1
+ import { NEBIUS } from '../../globals' ;
2
+ import {
3
+ chatCompleteParams ,
4
+ embedParams ,
5
+ completeParams ,
6
+ responseTransformers ,
7
+ } from '../open-ai-base' ;
8
+ import { ProviderConfigs } from '../types' ;
9
+ import { nebiusAPIConfig } from './api' ;
10
+
11
+ export const NebiusConfig : ProviderConfigs = {
12
+ chatComplete : chatCompleteParams ( [ ] , {
13
+ model : 'Qwen/Qwen2.5-72B-Instruct-fast' ,
14
+ } ) ,
15
+ embed : embedParams ( [ ] , { model : 'BAAI/bge-en-icl' } ) ,
16
+ complete : completeParams ( [ ] , { model : 'Qwen/Qwen2.5-72B-Instruct-fast' } ) ,
17
+ api : nebiusAPIConfig ,
18
+ responseTransforms : responseTransformers ( NEBIUS , {
19
+ chatComplete : true ,
20
+ embed : true ,
21
+ complete : true ,
22
+ } ) ,
23
+ } ;
You can’t perform that action at this time.
0 commit comments