mirror of
https://github.com/ivanfioravanti/chatbot-ollama.git
synced 2023-12-01 22:17:38 +03:00
23 lines
445 B
TypeScript
23 lines
445 B
TypeScript
import { FC } from 'react';
|
|
|
|
import { Prompt } from '@/types/prompt';
|
|
|
|
import { PromptComponent } from './Prompt';
|
|
|
|
interface Props {
|
|
prompts: Prompt[];
|
|
}
|
|
|
|
export const Prompts: FC<Props> = ({ prompts }) => {
|
|
return (
|
|
<div className="flex w-full flex-col gap-1">
|
|
{prompts
|
|
.slice()
|
|
.reverse()
|
|
.map((prompt, index) => (
|
|
<PromptComponent key={index} prompt={prompt} />
|
|
))}
|
|
</div>
|
|
);
|
|
};
|