Eliott C commited on
✨ Link to hf.co/chat from logo (#94)
Browse filesFiles changed (3)
3 unmodified lines4567891011123 unmodified linesMONGODB_URL=#your mongodb URL hereMONGODB_DB_NAME=chat-uiHF_TOKEN=#your huggingface token hereSHARE_BASE_URL=#https://hf.co/chatCOOKIE_NAME=hf-chatPUBLIC_MODEL_ENDPOINT=https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-6-llama-30bPUBLIC_MODEL_NAME=OpenAssistant/oasst-sft-6-llama-30b # public facing linkPUBLIC_MODEL_ID=OpenAssistant/oasst-sft-6-llama-30b-xor # used to link to model page3 unmodified lines4567891011123 unmodified linesMONGODB_URL=#your mongodb URL hereMONGODB_DB_NAME=chat-uiHF_TOKEN=#your huggingface token hereCOOKIE_NAME=hf-chatPUBLIC_ORIGIN=#https://hf.coPUBLIC_MODEL_ENDPOINT=https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-6-llama-30bPUBLIC_MODEL_NAME=OpenAssistant/oasst-sft-6-llama-30b # public facing linkPUBLIC_MODEL_ID=OpenAssistant/oasst-sft-6-llama-30b-xor # used to link to model page
6 unmodified lines7891011127 unmodified lines202122232425262728296 unmodified linesimport CarbonTrashCan from "~icons/carbon/trash-can";import CarbonExport from "~icons/carbon/export";import { switchTheme } from "$lib/switchTheme";const dispatch = createEventDispatcher<{shareConversation: { id: string; title: string };7 unmodified lines</script><div class="flex-none max-sm:pt-0 sticky top-0 px-3 py-3.5 flex items-center justify-between"><div class="rounded-xl font-semibold text-lg flex items-center"><Logo classNames="mr-1 text-3xl" />HuggingChat</div><ahref={base || "/"}class="flex border py-0.5 px-2 rounded-lg shadow-sm hover:shadow-none bg-white dark:bg-gray-700 dark:border-gray-600 text-center"6 unmodified lines789101112137 unmodified lines212223242526272829306 unmodified linesimport CarbonTrashCan from "~icons/carbon/trash-can";import CarbonExport from "~icons/carbon/export";import { switchTheme } from "$lib/switchTheme";import { PUBLIC_ORIGIN } from "$env/static/public";const dispatch = createEventDispatcher<{shareConversation: { id: string; title: string };7 unmodified lines</script><div class="flex-none max-sm:pt-0 sticky top-0 px-3 py-3.5 flex items-center justify-between"><a class="rounded-xl font-semibold text-lg flex items-center" href="{PUBLIC_ORIGIN}{base}/"><Logo classNames="mr-1 text-3xl" />HuggingChat</a><ahref={base || "/"}class="flex border py-0.5 px-2 rounded-lg shadow-sm hover:shadow-none bg-white dark:bg-gray-700 dark:border-gray-600 text-center"
1234518 unmodified lines2425262728293012 unmodified lines43444546474849import { base } from "$app/paths";import { SHARE_BASE_URL } from "$env/static/private";import { collections } from "$lib/server/database.js";import type { SharedConversation } from "$lib/types/SharedConversation.js";import { sha256 } from "$lib/utils/sha256.js";18 unmodified linesif (existingShare) {return new Response(JSON.stringify({url: (SHARE_BASE_URL || `${url.origin}${base}`) + `/r/${existingShare._id}`,}),{ headers: { "Content-Type": "application/json" } });12 unmodified linesreturn new Response(JSON.stringify({url: (SHARE_BASE_URL || `${url.origin}${base}`) + `/r/${shared._id}`,}),{ headers: { "Content-Type": "application/json" } });1234518 unmodified lines2425262728293012 unmodified lines43444546474849import { base } from "$app/paths";import { PUBLIC_ORIGIN } from "$env/static/private";import { collections } from "$lib/server/database.js";import type { SharedConversation } from "$lib/types/SharedConversation.js";import { sha256 } from "$lib/utils/sha256.js";18 unmodified linesif (existingShare) {return new Response(JSON.stringify({url: (PUBLIC_ORIGIN || `${url.origin}${base}`) + `/r/${existingShare._id}`,}),{ headers: { "Content-Type": "application/json" } });12 unmodified linesreturn new Response(JSON.stringify({url: `${PUBLIC_ORIGIN || url.origin}${base}/r/${shared._id}`,}),{ headers: { "Content-Type": "application/json" } });
.env+1-1
src/lib/components/NavMenu.svelte+3-2
src/routes/conversation/[id]/share/+server.ts+3-3