Merge pull request #200 from ollama-webui/modelfile-import

feat: OllamaHub import improvements
This commit is contained in:
Timothy Jaeryang Baek 2023-12-09 02:54:28 -05:00 committed by GitHub
commit 970a71354b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -325,7 +325,7 @@
</div>
{#if selectedModelfile.user}
<div class="mt-0.5 text-sm font-normal text-gray-500 dark:text-gray-500">
By <a href="https://ollamahub.com/"
By <a href="https://ollamahub.com/m/{selectedModelfile.user.username}"
>{selectedModelfile.user.name
? selectedModelfile.user.name
: `@${selectedModelfile.user.username}`}</a

View file

@ -228,7 +228,9 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
imageUrl = modelfile.imageUrl;
title = modelfile.title;
await tick();
tagName = `${modelfile.user.username}/${modelfile.tagName}`;
tagName = `${modelfile.user.username === 'hub' ? '' : `hub/`}${modelfile.user.username}/${
modelfile.tagName
}`;
desc = modelfile.desc;
content = modelfile.content;
suggestions =