Skip to content

Commit 15b0733

Browse files
authored
Merge pull request #1318 from Portkey-AI/feat/add-3d-model-ais
Feat/add 3d model ais
2 parents faf88d8 + 4fe1f19 commit 15b0733

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

src/globals.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const FEATHERLESS_AI: string = 'featherless-ai';
102102
export const KRUTRIM: string = 'krutrim';
103103
export const QDRANT: string = 'qdrant';
104104
export const THREE_ZERO_TWO_AI: string = '302ai';
105+
export const MESHY: string = 'meshy';
105106
export const TRIPO3D: string = 'tripo3d';
106107

107108
export const VALID_PROVIDERS = [
@@ -168,6 +169,7 @@ export const VALID_PROVIDERS = [
168169
KRUTRIM,
169170
QDRANT,
170171
THREE_ZERO_TWO_AI,
172+
MESHY,
171173
TRIPO3D,
172174
];
173175

src/providers/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import HyperbolicConfig from './hyperbolic';
6363
import { FeatherlessAIConfig } from './featherless-ai';
6464
import KrutrimConfig from './krutrim';
6565
import AI302Config from './302ai';
66+
import MeshyConfig from './meshy';
6667
import Tripo3DConfig from './tripo3d';
6768

6869
const Providers: { [key: string]: ProviderConfigs } = {
@@ -127,6 +128,7 @@ const Providers: { [key: string]: ProviderConfigs } = {
127128
'featherless-ai': FeatherlessAIConfig,
128129
krutrim: KrutrimConfig,
129130
'302ai': AI302Config,
131+
meshy: MeshyConfig,
130132
tripo3d: Tripo3DConfig,
131133
};
132134

src/providers/meshy/api.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ProviderAPIConfig } from '../types';
2+
3+
const MeshyAPIConfig: ProviderAPIConfig = {
4+
getBaseURL: ({ gatewayRequestURL }) => {
5+
const version = gatewayRequestURL.includes('text-to-3d') ? 'v2' : 'v1';
6+
return `https://api.meshy.ai/openapi/${version}`;
7+
},
8+
headers: ({ providerOptions }) => {
9+
return {
10+
Authorization: `Bearer ${providerOptions.apiKey}`,
11+
'Content-Type': 'application/json',
12+
};
13+
},
14+
getEndpoint: () => '',
15+
};
16+
17+
export default MeshyAPIConfig;

src/providers/meshy/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ProviderConfigs } from '../types';
2+
import MeshyAPIConfig from './api';
3+
4+
const MeshyConfig: ProviderConfigs = {
5+
api: MeshyAPIConfig,
6+
responseTransforms: {},
7+
};
8+
9+
export default MeshyConfig;

0 commit comments

Comments
 (0)