import { Component } from '@angular/core';
import { TestChatCompletion,TestChatMessage } from '../class-chat-completion';
@Component({
  selector: 'app-page-chat-panel',
  templateUrl: './page-chat-panel.component.html',
  styleUrls: ['./page-chat-panel.component.scss']
})
export class PageChatPanelComponent {
  messageList:Array<TestChatMessage> = []
  userInput:string = "FmodeAiTest测试问题"
  
  completion:TestChatCompletion
  constructor(){
    this.completion = new TestChatCompletion(this.messageList)
  }
  send(){
    this.messageList.push({
      role:"user",
      content: this.userInput
    })
    this.userInput = ""
    this.completion.createCompletionByStream()
  }

}
