Initial commit

This commit is contained in:
Eugenius Naumenko
2026-06-07 22:20:57 +00:00
commit a7d8f72129
357 changed files with 168337 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { request } from './client';
import type { TeacherResponse } from './types';
export type ConversationResponse = {
session?: { id: string };
turn?: { text: string };
user_turn?: { text: string };
teacher_turn?: { text: string };
teacher: TeacherResponse;
audio?: { mime_type: string; base64: string } | null;
};
export function startConversation() {
return request<ConversationResponse>('/conversation/start', {
method: 'POST',
body: JSON.stringify({})
});
}
export function sendConversationTurn(sessionId: string, text: string) {
return request<ConversationResponse>(`/conversation/${sessionId}/turn`, {
method: 'POST',
body: JSON.stringify({ text })
});
}