Skip to content

Commit

Permalink
ollama: stop auto-fetch while typing every char of the url
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Nov 10, 2023
1 parent 72a93f9 commit 70e73b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/llms/vendors/ollama/OllamaSourceSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function OllamaSourceSetup(props: { sourceId: DModelSourceId }) {
const [adminOpen, setAdminOpen] = React.useState(false);

// external state
const { source, sourceHasLLMs, access, updateSetup } =
const { source, access, updateSetup } =
useSourceSetup(props.sourceId, ModelVendorOllama.getAccess);

// derived state
Expand All @@ -34,7 +34,7 @@ export function OllamaSourceSetup(props: { sourceId: DModelSourceId }) {

// fetch models
const { isFetching, refetch, isError, error } = apiQuery.llmOllama.listModels.useQuery({ access }, {
enabled: !sourceHasLLMs && shallFetchSucceed,
enabled: false, // !sourceHasLLMs && shallFetchSucceed,
onSuccess: models => source && useModelsStore.getState().addLLMs(models.models.map(model => modelDescriptionToDLLM(model, source))),
staleTime: Infinity,
});
Expand Down

1 comment on commit 70e73b2

@vercel
Copy link

@vercel vercel bot commented on 70e73b2 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

big-agi – ./

big-agi-git-main-enricoros.vercel.app
big-agi-enricoros.vercel.app

Please sign in to comment.