1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
  <div>
    电子说明书
    <a-card>
      {{answer}}
    </a-card>
    <a-input-search placeholder="input search text" enter-button @search="onSearch"/>
  </div>
</template>
 
<script>
  import { getDataAfterSearchByApi } from '@/api/AI'
 
  export default {
    name: 'ElectronicManual',
    components: {},
    data() {
      return {
        answer:''
      }
    },
    methods: {
      onSearch() {
        const param = {
          'id': '683a65fd-8feb-4446-ad32-714c4785f667',
          'messages': [
            {
              'role': 'user',
              'content': '给我讲个故事?'
            }
          ],
          'stream': false,
          'max_tokens': 500
        }
        getDataAfterSearchByApi()
          .then(res => {
            console.log('res', res)
            this.answer = res.result
          })
 
      }
    }
  }
</script>
 
<style scoped>
 
</style>