Skip to content

witAiChat AI Dialog

witAiChat is an AI dialog business component similar to chat interface, a highly customizable typing effect component, integrates AI connection methods inside, can configure key and API, default stream output mode. Supports Markdown rendering and dynamic typing effects. View Demo>>

Usage Example

vue
<template>
  <div>
    <witAiChat
      ref="witAiChatRef"
      assistantId="1"
      :conversationId="conversationId"
      :messages="currentConversation.messages"
      :isNew="isNew"
      :problem="commonProblem"
      @create="handleCreateConversation"
    />
  </div>
</template>

<script lang="ts" setup>
const witAiChatRef = ref<any>()
aiChatRef.value.handleStop() // Stop answering
</script>

API

Property NameTypeDefault ValueDescription
isNew[Boolean]falseWhether it is a new session
assistantId[String]''Agent ID
conversationId[String]''Session ID
isHistory[Boolean]falseWhether there is history
messages[Array]() => []Message list
completionsParams[Object]() => {}Completion parameters
drugName[String]''Drug name
problem[Array]() => []Guess you want to ask, if not passed, call API to get 3 random questions
comment[Boolean]falseAI comment
isDeep[Boolean]falseWhether to show deep analysis
isSuggest[Boolean]trueWhether to show suggestions
inputBg[String]'var(--el-base-background)'Input box background color
specialType[String]''Special type
reviewRegistrationForm[Object]() => {}Review registration form

Methods

MethodDescriptionParameters
handleStopStop AI answering-

湘ICP备2024070110号