From 0db8f7f2b803dcb0338294191d16e7d4f5cc0668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javis=20V=2E=20P=C3=A9rez?= Date: Tue, 3 Dec 2024 13:00:21 -0400 Subject: [PATCH] Moar TS fixes --- frontend/dev-mode/src/components/ChatPrompt.vue | 11 ++++++----- frontend/dev-mode/src/composables/useLlama.ts | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/dev-mode/src/components/ChatPrompt.vue b/frontend/dev-mode/src/components/ChatPrompt.vue index 3860caed..092e35c7 100644 --- a/frontend/dev-mode/src/components/ChatPrompt.vue +++ b/frontend/dev-mode/src/components/ChatPrompt.vue @@ -15,7 +15,8 @@ import { type Parameters, DEFAULT_SESSION, DEFAULT_PARAMS_VALUES, - type TranscriptMessage + type TranscriptMessage, + type LlamaComposableResponse } from '@/composables/useLlama' const message = ref('') @@ -31,10 +32,10 @@ const stats = inject('stats', {} as Stats) const isGenerating = inject('isGenerating', false) const isPending = inject('isPending', false) const isChatStarted = inject('isChatStarted', false) -const runChat = inject('runChat') -const runCompletion = inject('runCompletion') -const stop = inject('stop') -const uploadImage = inject('uploadImage') +const runChat = inject('runChat') +const runCompletion = inject('runCompletion') +const stop = inject('stop') +const uploadImage = inject('uploadImage') if (!runChat || !runCompletion || !stop || !uploadImage) { throw new Error('required function not provided') diff --git a/frontend/dev-mode/src/composables/useLlama.ts b/frontend/dev-mode/src/composables/useLlama.ts index 60bfe080..fe4c6158 100644 --- a/frontend/dev-mode/src/composables/useLlama.ts +++ b/frontend/dev-mode/src/composables/useLlama.ts @@ -59,7 +59,7 @@ export type Parameters = { prop_order?: string, } -type LlamaComposableResponse = { +export type LlamaComposableResponse = { stats: Ref | null>, session: Ref, template: (str: string, extraSettings?: Record) => string,