feat: Add model type support
Adds model type support for chat and embedding models. This allows users to specify which type of model they want to use when adding custom models. Additionally, this commit introduces a more descriptive interface for adding custom models, enhancing the clarity of the model selection process.
This commit is contained in:
@@ -138,7 +138,7 @@ export const getEmbeddingModels = async ({ returnEmpty }: {
|
||||
}) => {
|
||||
try {
|
||||
const ollamaModels = await getAllModels({ returnEmpty })
|
||||
const customModels = await ollamaFormatAllCustomModels()
|
||||
const customModels = await ollamaFormatAllCustomModels("embedding")
|
||||
|
||||
return [
|
||||
...ollamaModels.map((model) => {
|
||||
@@ -217,7 +217,7 @@ export const fetchChatModels = async ({
|
||||
})
|
||||
const chromeModel = await getChromeAIModel()
|
||||
|
||||
const customModels = await ollamaFormatAllCustomModels()
|
||||
const customModels = await ollamaFormatAllCustomModels("chat")
|
||||
|
||||
return [
|
||||
...chatModels,
|
||||
@@ -234,7 +234,7 @@ export const fetchChatModels = async ({
|
||||
}
|
||||
})
|
||||
const chromeModel = await getChromeAIModel()
|
||||
const customModels = await ollamaFormatAllCustomModels()
|
||||
const customModels = await ollamaFormatAllCustomModels("chat")
|
||||
return [
|
||||
...models,
|
||||
...chromeModel,
|
||||
|
||||
Reference in New Issue
Block a user