Skip to content

Commit

Permalink
- fix: now we accept the production origin tauri://localhost in ollama (
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol authored May 18, 2024
1 parent 425c665 commit f491106
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct OllamaOptions {
pub ollama_host: String,
pub ollama_num_parallel: String,
pub ollama_max_loaded_models: String,
pub ollama_origins: Vec<String>,
pub ollama_origins: String,
}

pub struct OllamaProcessHandler {
Expand Down Expand Up @@ -41,7 +41,7 @@ impl OllamaProcessHandler {
ollama_host: "127.0.0.1:11435".to_string(),
ollama_num_parallel: "2".to_string(),
ollama_max_loaded_models: "2".to_string(),
ollama_origins: ["*".to_string()].to_vec(),
ollama_origins: "*".to_string(),
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Badge } from '@shinkai_network/shinkai-ui';
import { cn } from '@shinkai_network/shinkai-ui/utils';

import { OllamaModelQuality } from '../../../lib/shinkai-node-manager/ollama_models';
import { OllamaModelQuality } from '../../../lib/shinkai-node-manager/ollama-models';

export const ModelQuailityTag = ({
quality,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Badge } from '@shinkai_network/shinkai-ui';
import { cn } from '@shinkai_network/shinkai-ui/utils';

import { OllamaModelSpeed } from '../../../lib/shinkai-node-manager/ollama_models';
import { OllamaModelSpeed } from '../../../lib/shinkai-node-manager/ollama-models';

export const ModelSpeedTag = ({ speed }: { speed: OllamaModelSpeed }) => {
const emojiMap: { [key in OllamaModelSpeed]: string } = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import { ModelResponse, ProgressResponse } from 'ollama/browser';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';

import { OLLAMA_MODELS } from '../../lib/shinkai-node-manager/ollama_models';
import {
useOllamaListQuery,
useOllamaPullMutation,
useOllamaRemoveMutation,
} from '../../lib/shinkai-node-manager/ollama-client';
import { OLLAMA_MODELS } from '../../lib/shinkai-node-manager/ollama-models';
import {
useShinkaiNodeGetOllamaApiUrlQuery,
useShinkaiNodeIsRunningQuery,
Expand All @@ -35,7 +35,7 @@ import { ModelSpeedTag } from './components/model-speed-tag';
export const OllamaModels = () => {
const auth = useAuth((auth) => auth.auth);
const { data: ollamaApiUrl } = useShinkaiNodeGetOllamaApiUrlQuery();
const ollamaConfig = { host: ollamaApiUrl || '' };
const ollamaConfig = { host: ollamaApiUrl || 'http://127.0.0.1:11435' };
const { data: isShinkaiNodeRunning } = useShinkaiNodeIsRunningQuery();
const { mutateAsync: shinkaiNodeSpawn } = useShinkaiNodeSpawnMutation({});
const { mutateAsync: syncOllamaModels } = useSyncOllamaModels();
Expand Down

0 comments on commit f491106

Please sign in to comment.