const inference = new HfInference(HF_TOKEN);
const model = “mistralai/Mistral-7B-Instruct-v0.2”;
const userMessage = inputText;
const output = await inference.chatCompletion({
model,
messages: [{ role: “user”, content: userMessage }],
});
const botResponse = output.choices[0].message.content;
setOutputText(botResponse);
setConversation([…conversation, { user: inputText, bot: botResponse }]);
setInputText(‘’);
I am using this method in React js which is working as expected , but the same thing when I am running in react native , this block is neither giving any error or success response , what is wrong , or any better suggestion on how I can run modal in React native ?
Thanks.