Skip to content

Commit d75dc34

Browse files
authored
Merge pull request #57 from MaxedOut-Muneo/56-hotfix/chatbot-hotfix
[Hotfix] - 챗봇 오류 수정
2 parents 6a93d58 + d7a15f3 commit d75dc34

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/web/src/api/chatbot

apps/web/src/api/chatbot/api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { client } from '../client';
22
import { toApiError } from '../errors';
33
import { type ChatRequest, type ChatResponse } from './types';
44

5+
// 챗봇 전용 타임아웃 설정
6+
const CHATBOT_TIMEOUT_MS = 30_000;
7+
58
export const askChatbot = async (data: ChatRequest): Promise<ChatResponse> => {
69
try {
7-
return await client.post('api/v1/chatbot/chat', { json: data }).json<ChatResponse>();
10+
return await client.post('api/v1/chatbot/chat', { json: data, timeout: CHATBOT_TIMEOUT_MS }).json<ChatResponse>();
811
} catch (e) {
912
throw toApiError(e);
1013
}

0 commit comments

Comments
 (0)