Spaces:
Running
Running
Update src/App.tsx
Browse files- src/App.tsx +3 -5
src/App.tsx
CHANGED
@@ -27,20 +27,16 @@ const myCustomInstruction = `تو دستیار صوتی و تصویری پیشر
|
|
27 |
**مهم: به هیچ عنوان در پاسخهای خود از ایموجی استفاده نکن.**
|
28 |
`.trim();
|
29 |
|
30 |
-
// --- 👇 تغییر اصلی اینجا اعمال شده است 👇 ---
|
31 |
const initialAppConfig: LiveConfig = {
|
32 |
model: "models/gemini-2.0-flash-exp",
|
33 |
systemInstruction: { parts: [{ text: myCustomInstruction }] },
|
34 |
-
// این بخش برای فعالسازی جستجوی گوگل اضافه شده است
|
35 |
tools: [
|
36 |
{ googleSearch: {} }
|
37 |
],
|
38 |
-
// این بخش برای اطمینان از پاسخ صوتی اضافه شده (اختیاری ولی توصیه میشود)
|
39 |
generationConfig: {
|
40 |
responseModalities: "audio",
|
41 |
}
|
42 |
};
|
43 |
-
// --- 👆 پایان تغییرات 👆 ---
|
44 |
|
45 |
interface AppInternalLogicProps {
|
46 |
isMicActive: boolean;
|
@@ -91,7 +87,9 @@ const AppInternalLogic: React.FC<AppInternalLogicProps> = ({ isMicActive, isCamA
|
|
91 |
)}
|
92 |
{/* لوگوی کوچک از اینجا حذف شد و به ControlTray منتقل شد */}
|
93 |
</div>
|
94 |
-
|
|
|
|
|
95 |
</div>
|
96 |
</div>
|
97 |
);
|
|
|
27 |
**مهم: به هیچ عنوان در پاسخهای خود از ایموجی استفاده نکن.**
|
28 |
`.trim();
|
29 |
|
|
|
30 |
const initialAppConfig: LiveConfig = {
|
31 |
model: "models/gemini-2.0-flash-exp",
|
32 |
systemInstruction: { parts: [{ text: myCustomInstruction }] },
|
|
|
33 |
tools: [
|
34 |
{ googleSearch: {} }
|
35 |
],
|
|
|
36 |
generationConfig: {
|
37 |
responseModalities: "audio",
|
38 |
}
|
39 |
};
|
|
|
40 |
|
41 |
interface AppInternalLogicProps {
|
42 |
isMicActive: boolean;
|
|
|
87 |
)}
|
88 |
{/* لوگوی کوچک از اینجا حذف شد و به ControlTray منتقل شد */}
|
89 |
</div>
|
90 |
+
{/* --- 👇 تغییر اصلی و تصحیح خطا اینجاست 👇 --- */}
|
91 |
+
<ControlTray videoRef={videoRef} supportsVideo={true} onVideoStreamChange={(stream) => {}} isAppMicActive={isMicActive} onAppMicToggle={setIsMicActive} isAppCamActive={isCamActive} onAppCamToggle={setIsCamActive} currentFacingMode={currentFacingMode} onFacingModeChange={onFacingModeChange} onUserSpeakingChange={setIsUserSpeaking} />
|
92 |
+
{/* --- 👆 پایان تغییرات 👆 --- */}
|
93 |
</div>
|
94 |
</div>
|
95 |
);
|