feat(providers): add novita (#49)
This commit is contained in:
3 files changed
+40
No files matched your search
@@ -8,6 +8,7 @@ words:
|
||||
- BAAI
|
||||
- bumpp
|
||||
- changelogithub
|
||||
- cognitivecomputations
|
||||
- deepseek
|
||||
- elevenlabs
|
||||
- eslintcache
|
||||
@@ -16,6 +17,8 @@ words:
|
||||
- importantimport
|
||||
- koemotion
|
||||
- masknet
|
||||
- mistralai
|
||||
- mixtral
|
||||
- moeru
|
||||
- moeru-ai
|
||||
- mxbai-embed-large
|
||||
@@ -23,6 +26,7 @@ words:
|
||||
- nemotron
|
||||
- netease
|
||||
- nomic-embed-text
|
||||
- Novita
|
||||
- ollama
|
||||
- openrouter
|
||||
- pkgroll
|
||||
@@ -36,6 +40,7 @@ words:
|
||||
- unspeech
|
||||
- valibot
|
||||
- vitest
|
||||
- wizardlm
|
||||
- xsai
|
||||
- xsfetch
|
||||
- xsschema
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export * from './deepseek'
|
||||
export * from './google-generative-ai'
|
||||
export * from './novita'
|
||||
export * from './ollama'
|
||||
export * from './openai'
|
||||
export * from './openrouter'
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { ChatProvider, ModelProvider, ProviderOptions, ProviderResult } from '../types'
|
||||
|
||||
import { generateCRO } from '../utils/generate-cro'
|
||||
|
||||
export const createNovita = (userOptions: ProviderOptions<true>):
|
||||
/** @see {@link https://novita.ai/pricing} */
|
||||
ChatProvider< | 'cognitivecomputations/dolphin-mixtral-8x22b'
|
||||
| 'deepseek/deepseek-r1'
|
||||
| 'deepseek/deepseek-r1-distill-llama-8b'
|
||||
| 'deepseek/deepseek-r1-distill-llama-70b'
|
||||
| 'deepseek/deepseek-r1-distill-qwen-14b'
|
||||
| 'deepseek/deepseek-r1-distill-qwen-32b'
|
||||
| 'deepseek/deepseek_v3'
|
||||
| 'meta-llama/llama-3.2-1b-instruct'
|
||||
| 'meta-llama/llama-3.2-3b-instruct'
|
||||
| 'meta-llama/llama-3.2-11b-vision-instruct'
|
||||
| 'meta-llama/llama-3.3-70b-instruct'
|
||||
| 'microsoft/wizardlm-2-8x22b'
|
||||
| 'mistralai/mistral-7b-instruct'
|
||||
| 'mistralai/mistral-nemo'
|
||||
>
|
||||
& ModelProvider => {
|
||||
const options: ProviderResult = {
|
||||
...userOptions,
|
||||
baseURL: userOptions.baseURL ?? new URL('https://api.novita.ai/v3/openai/'),
|
||||
}
|
||||
|
||||
const result = (model: string) => generateCRO(model, options)
|
||||
|
||||
return {
|
||||
chat: result,
|
||||
model: () => options,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user