add analysis recommendation

This commit is contained in:
Danel Kungla
2025-09-17 17:35:04 +03:00
parent b96ef47b2d
commit 1b634f9736
6 changed files with 1100 additions and 799 deletions

View File

@@ -1,26 +1,24 @@
'use client';
import React, { useEffect } from 'react';
import React from 'react';
import OpenAI from 'openai';
import OrderAnalysesCards, { OrderAnalysisCard } from './order-analyses-cards';
export default function Recommendations() {
// const client = new OpenAI();
export default function Recommendations({
recommended,
countryCode,
}: {
recommended: OrderAnalysisCard[];
countryCode: string;
}) {
if (recommended.length < 1) {
return null;
}
const getRecommendations = async () => {
// const response = await client.responses.create({
// model: 'gpt-5',
// input: 'Write a short bedtime story about a unicorn.',
// });
// console.log(response.output_text);
};
// useEffect(() => {
// console.log('process.env', process.env);
// if (process.env.OPENAI_API_KEY) {
// getRecommendations();
// }
// }, []);
return <div>Recommendations</div>;
return (
<div>
<h4>Medreport soovitab teile</h4>
<OrderAnalysesCards analyses={recommended} countryCode={countryCode} />
</div>
);
}