Compare commits
No commits in common. "4962319fcb878d98674b66584dbb78f4ad5cbf1d" and "75a7438881767c3d64cfd018df08568624e427a6" have entirely different histories.
4962319fcb
...
75a7438881
2 changed files with 8 additions and 12 deletions
|
@ -19,9 +19,7 @@ const ConversationFrontend = React.forwardRef<HTMLDivElement, ConversationProps>
|
|||
key={index}
|
||||
className={isUserMessage ? 'user-message' : 'ai-message'}
|
||||
>
|
||||
<p>
|
||||
{message}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
|
|
@ -3,13 +3,6 @@ import InputFrontend from './InputFrontend';
|
|||
import ConversationFrontend from './ConversationFrontend';
|
||||
import { Mistral } from '@mistralai/mistralai';
|
||||
|
||||
var messages = [
|
||||
'User: Hello!',
|
||||
'AI: Hi there!',
|
||||
'User: How are you?',
|
||||
'AI: I’m good, thank you!'
|
||||
];
|
||||
|
||||
async function prompt_mistral(model: string, prompt: string, system: string) {
|
||||
const apiKey = "m3kZRjN8DRSIo88r8Iti9hmKGWIklrLY";
|
||||
|
||||
|
@ -22,9 +15,8 @@ async function prompt_mistral(model: string, prompt: string, system: string) {
|
|||
|
||||
if (chatResponse && chatResponse.choices && chatResponse.choices.length > 0) {
|
||||
if (chatResponse.choices[0].message.content) {
|
||||
messages.push('AI: ' + chatResponse.choices[0].message.content);
|
||||
messages.push('AI: ', chatResponse.choices[0].message.content);
|
||||
console.error('Error: Brain Not Found');
|
||||
console.log(messages)
|
||||
}
|
||||
} else {
|
||||
console.error('Error: Unexpected API response:', chatResponse);
|
||||
|
@ -32,7 +24,7 @@ async function prompt_mistral(model: string, prompt: string, system: string) {
|
|||
}
|
||||
|
||||
const handleSendClick = (message: string) => {
|
||||
messages.push('User: ' + message);
|
||||
messages.push('User: ', message);
|
||||
prompt_mistral("mistral-large-latest", message, "You are a helpful assistant.")
|
||||
};
|
||||
|
||||
|
@ -41,6 +33,12 @@ const handleMicClick = () => {
|
|||
// Do something when the mic button is clicked
|
||||
};
|
||||
|
||||
var messages = [
|
||||
'User: Hello!',
|
||||
'AI: Hi there!',
|
||||
'User: How are you?',
|
||||
'AI: I’m good, thank you!'
|
||||
];
|
||||
|
||||
const handleResendClick = () => {
|
||||
console.log('Resend button clicked');
|
||||
|
|
Loading…
Reference in a new issue