f
This commit is contained in:
parent
4c4360cefc
commit
9de8c3b5c7
@ -3,6 +3,7 @@ import { Message } from "@/types/ask";
|
|||||||
import { Dispatch, SetStateAction, useCallback, useRef } from "react";
|
import { Dispatch, SetStateAction, useCallback, useRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
|
import { createNewConversation } from "./utils";
|
||||||
|
|
||||||
interface AskHelloProps {
|
interface AskHelloProps {
|
||||||
setUserMessages: Dispatch<SetStateAction<Message[]>>;
|
setUserMessages: Dispatch<SetStateAction<Message[]>>;
|
||||||
@ -37,7 +38,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
|
|||||||
// // }
|
// // }
|
||||||
// // ]);
|
// // ]);
|
||||||
|
|
||||||
// const sessionId = await createNewConversation(text);
|
const sessionId = await createNewConversation(text);
|
||||||
// if (!sessionId) {
|
// if (!sessionId) {
|
||||||
// console.error("Failed to create a new conversation.");
|
// console.error("Failed to create a new conversation.");
|
||||||
// //
|
// //
|
||||||
@ -45,7 +46,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// setConversationId(sessionId);
|
setConversationId(sessionId);
|
||||||
// // try {
|
// // try {
|
||||||
// // if (webSocketManager && typeof (webSocketManager as any).send === 'function') {
|
// // if (webSocketManager && typeof (webSocketManager as any).send === 'function') {
|
||||||
// // (webSocketManager as any).send({
|
// // (webSocketManager as any).send({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user