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> </div>
{#if selectedModelfile.user} {#if selectedModelfile.user}
<div class="mt-0.5 text-sm font-normal text-gray-500 dark:text-gray-500"> <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.name ? selectedModelfile.user.name
: `@${selectedModelfile.user.username}`}</a : `@${selectedModelfile.user.username}`}</a

View File

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