File tree Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export const QDRANT: string = 'qdrant';
104104export const THREE_ZERO_TWO_AI : string = '302ai' ;
105105export const MESHY : string = 'meshy' ;
106106export const TRIPO3D : string = 'tripo3d' ;
107+ export const NEXTBIT : string = 'nextbit' ;
107108
108109export const VALID_PROVIDERS = [
109110 ANTHROPIC ,
@@ -171,6 +172,7 @@ export const VALID_PROVIDERS = [
171172 THREE_ZERO_TWO_AI ,
172173 MESHY ,
173174 TRIPO3D ,
175+ NEXTBIT ,
174176] ;
175177
176178export const CONTENT_TYPES = {
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ import KrutrimConfig from './krutrim';
6565import AI302Config from './302ai' ;
6666import MeshyConfig from './meshy' ;
6767import Tripo3DConfig from './tripo3d' ;
68+ import { NextBitConfig } from './nextbit' ;
6869
6970const Providers : { [ key : string ] : ProviderConfigs } = {
7071 openai : OpenAIConfig ,
@@ -129,6 +130,7 @@ const Providers: { [key: string]: ProviderConfigs } = {
129130 krutrim : KrutrimConfig ,
130131 '302ai' : AI302Config ,
131132 meshy : MeshyConfig ,
133+ nextbit : NextBitConfig ,
132134 tripo3d : Tripo3DConfig ,
133135} ;
134136
Original file line number Diff line number Diff line change 1+ import { ProviderAPIConfig } from '../types' ;
2+
3+ export const nextBitAPIConfig : ProviderAPIConfig = {
4+ getBaseURL : ( ) => 'https://api.nextbit256.com/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 'complete' :
14+ return '/completions' ;
15+ default :
16+ return '' ;
17+ }
18+ } ,
19+ } ;
Original file line number Diff line number Diff line change 1+ import { NEXTBIT } from '../../globals' ;
2+ import {
3+ chatCompleteParams ,
4+ completeParams ,
5+ responseTransformers ,
6+ } from '../open-ai-base' ;
7+ import { ProviderConfigs } from '../types' ;
8+ import { nextBitAPIConfig } from './api' ;
9+
10+ export const NextBitConfig : ProviderConfigs = {
11+ chatComplete : chatCompleteParams ( [ ] , { model : 'microsoft:phi-4' } ) ,
12+ complete : completeParams ( [ ] , { model : 'microsoft:phi-4' } ) ,
13+ api : nextBitAPIConfig ,
14+ responseTransforms : responseTransformers ( NEXTBIT , {
15+ chatComplete : true ,
16+ complete : true ,
17+ } ) ,
18+ } ;
You can’t perform that action at this time.
0 commit comments