From 8de4215b7d3767fca01da0e86e68a44cd7e8be07 Mon Sep 17 00:00:00 2001 From: fegloff Date: Tue, 3 Oct 2023 20:47:22 -0500 Subject: [PATCH] fix some harmony-llm-api after merge issues --- src/modules/llms/api/llmApi.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/modules/llms/api/llmApi.ts b/src/modules/llms/api/llmApi.ts index fdb220d..06464a7 100644 --- a/src/modules/llms/api/llmApi.ts +++ b/src/modules/llms/api/llmApi.ts @@ -2,7 +2,7 @@ import axios, { AxiosError } from 'axios' import config from '../../../config' import { type ChatConversation } from '../../types' -const API_ENDPOINT = config.llms.apiEndpoint // 'http://localhost:8080' // http://127.0.0.1:5000' // config.llms.apiEndpoint // config.llms.apiEndpoint // 'http://127.0.0.1:5000' +const API_ENDPOINT = 'http://127.0.0.1:5000' // config.llms.apiEndpoint // 'http://localhost:8080' // http://127.0.0.1:5000' // config.llms.apiEndpoint // config.llms.apiEndpoint // 'http://127.0.0.1:5000' export interface LlmCompletion { completion: ChatConversation | undefined @@ -28,8 +28,9 @@ export const llmAddUrlDocument = async (args: LlmAddUrlDocument): Promise => { +export const llmCheckCollectionStatus = async (name: string): Promise => { try { - const data = { collectionName } - const endpointUrl = `${API_ENDPOINT}/collections/document` - const response = await axios.get(endpointUrl, { params: data }) + // const data = { collectionName: name } + const endpointUrl = `${API_ENDPOINT}/collections/document/${name}` // ?collectionName=${collectionName}` + console.log(endpointUrl) + const response = await axios.get(endpointUrl) // , { params: data } if (response) { return response.data.price }