Skip to content

Commit

Permalink
Moar TS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
javisperez committed Dec 3, 2024
1 parent fefa761 commit 0db8f7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions frontend/dev-mode/src/components/ChatPrompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
type Parameters,
DEFAULT_SESSION,
DEFAULT_PARAMS_VALUES,
type TranscriptMessage
type TranscriptMessage,
type LlamaComposableResponse
} from '@/composables/useLlama'
const message = ref('')
Expand All @@ -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<Function>('runChat')
const runCompletion = inject<Function>('runCompletion')
const stop = inject<Function>('stop')
const uploadImage = inject<Function>('uploadImage')
const runChat = inject<LlamaComposableResponse['chat']>('runChat')
const runCompletion = inject<LlamaComposableResponse['runCompletion']>('runCompletion')
const stop = inject<LlamaComposableResponse['stop']>('stop')
const uploadImage = inject<LlamaComposableResponse['uploadImage']>('uploadImage')
if (!runChat || !runCompletion || !stop || !uploadImage) {
throw new Error('required function not provided')
Expand Down
2 changes: 1 addition & 1 deletion frontend/dev-mode/src/composables/useLlama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type Parameters = {
prop_order?: string,
}

type LlamaComposableResponse = {
export type LlamaComposableResponse = {
stats: Ref<Record<string, string> | null>,
session: Ref<Session>,
template: (str: string, extraSettings?: Record<string, any>) => string,
Expand Down

0 comments on commit 0db8f7f

Please sign in to comment.