202226701046 hai 3 meses
pai
achega
78cb9d2227

+ 3 - 3
healthyfood-app/src/app/tab3/tab3.page.html

@@ -10,8 +10,8 @@
   <div class="container">
     <h1>饮食习惯</h1>
     <ion-input 
-      [value]="qunti" 
-      (ionInput)="quntiInput($event)" 
+      [value]="xiguan" 
+      (ionInput)="xiguanInput($event)" 
       placeholder="请写出平日的饮食" 
       autoGrow="true">
     </ion-input>
@@ -47,6 +47,6 @@
   
     <fm-markdown-preview *ngIf="isComplete" class="content-style" [content]="responseMsg"></fm-markdown-preview>
 
-
+    <div>{{responseMsg}}</div>
 </div>
 </ion-content>

+ 4 - 4
healthyfood-app/src/app/tab3/tab3.page.ts

@@ -16,7 +16,7 @@ import { FmodeChatCompletion, MarkdownPreviewModule } from 'fmode-ng';
   ],
 })
 export class Tab3Page {
-  qunti: string = "";
+  xiguan: string = "";
   jikou: string = "";
   userPrompt: string = "";
   responseMsg: any = "";
@@ -26,8 +26,8 @@ export class Tab3Page {
 
   ngOnInit() {}
 
-  quntiInput(ev: any) {
-    this.qunti = ev.detail.value;
+  xiguanInput(ev: any) {
+    this.xiguan = ev.detail.value;
   }
 
   jikouInput(ev: any) {
@@ -44,7 +44,7 @@ export class Tab3Page {
     let PromptTemplate = `
     你是一名专业的饮食营养规划师,拥有丰富的营养学背景和实践经验。你的工作是为不同需求的人群提供个性化的饮食规划,帮助他们实现健康目标,如减肥、增肌、健康维护或疾病管理。
     你可以根据用户的需求为客户设计量身定制具体的饮食方案。
-    当前来咨询用户的饮食习惯是${this.qunti},用户的饮食偏好是${this.jikou}需求描述是${this.userPrompt}`;
+    当前来咨询用户的饮食习惯是${this.xiguan},用户的饮食偏好是${this.jikou}需求描述是${this.userPrompt}`;
 
     let completion = new FmodeChatCompletion([
       { role: "system", content: "" },