Skip to content

Commit

Permalink
Merge pull request #391 from dcSpark/nico/add_exo
Browse files Browse the repository at this point in the history
add exo
  • Loading branch information
nicarq authored Jul 29, 2024
2 parents aa32d05 + f53616e commit 2ca9c85
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ apps/shinkai-desktop/src-tauri/node_storage

apps/shinkai-desktop/src-tauri/bin/ollama-windows-resources/*
apps/shinkai-desktop/src-tauri/bin/*
launch.json
3 changes: 2 additions & 1 deletion apps/shinkai-desktop/src/pages/chat/chat-conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ const ChatConversation = () => {
const currentInbox = useGetCurrentInbox();
const hasProviderEnableStreaming =
currentInbox?.agent?.model.split(':')?.[0] === Models.Ollama ||
currentInbox?.agent?.model.split(':')?.[0] === Models.Gemini;
currentInbox?.agent?.model.split(':')?.[0] === Models.Gemini ||
currentInbox?.agent?.model.split(':')?.[0] === Models.Exo;

const chatForm = useForm<ChatMessageFormSchema>({
resolver: zodResolver(chatMessageFormSchema),
Expand Down
6 changes: 6 additions & 0 deletions apps/shinkai-desktop/src/pages/create-agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ const modelOptions: { value: Models; label: string }[] = [
value: Models.Gemini,
label: 'Gemini',
},
{
value: Models.Exo,
label: 'Exo',
},
];

export const getModelObject = (
Expand All @@ -71,6 +75,8 @@ export const getModelObject = (
return { Ollama: { model_type: modelType } };
case Models.Gemini:
return { Gemini: { model_type: modelType } };
case Models.Exo:
return { Exo: { model_type: modelType } };
default:
return { [model]: { model_type: modelType } };
}
Expand Down
5 changes: 5 additions & 0 deletions libs/shinkai-message-ts/src/models/SchemaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export type AgentAPIModel = {
GenericAPI?: GenericAPI;
Ollama?: Ollama;
Gemini?: Gemini;
Exo?: Exo;
} & {
[model: string]: ModelType;
};
Expand All @@ -273,6 +274,10 @@ export interface GenericAPI {
model_type: string;
}

export interface Exo {
model_type: string;
}

export interface APIAddAgentRequest {
agent: SerializedLLMProvider;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class SerializedLLMProviderWrapper {
modelStr = 'ollama:' + agent.model.Ollama.model_type;
} else if (agent?.model?.Gemini) {
modelStr = 'gemini:' + agent.model.Gemini.model_type;
} else if (agent?.model?.Exo) {
modelStr = 'exo:' + agent.model.Exo.model_type;
} else if (Object.keys(agent?.model).length > 0) {
const customModelProvider = Object.keys(agent.model)[0];
modelStr = `${customModelProvider}:${agent.model[customModelProvider].model_type}`;
Expand Down
10 changes: 10 additions & 0 deletions libs/shinkai-node-state/src/lib/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export enum Models {
TogetherComputer = 'togethercomputer',
Ollama = 'ollama',
Gemini = 'gemini',
Exo = 'exo',
}

export const modelsConfig = {
Expand Down Expand Up @@ -74,4 +75,13 @@ export const modelsConfig = {
},
],
},
[Models.Exo]: {
apiUrl: 'http://localhost:8000',
modelTypes: [
{
name: 'Llama3.1-8b',
value: 'llama3.1-8b',
},
],
},
};

0 comments on commit 2ca9c85

Please sign in to comment.