Browse Source

Update 'README.md'

天问 2 years ago
parent
commit
9e4aecfc82
1 changed files with 18 additions and 0 deletions
  1. 18 0
      README.md

+ 18 - 0
README.md

@@ -5,3 +5,21 @@
 The following are the possible chart types supported by the code provided: area, bar, line, composed, scatter, pie, radar, radialBar, treemap, and funnel. Given the user input: ${inputData}, identify the chart type the user wants to display. Return just one word
 The following are the possible chart types supported by the code provided: area, bar, line, composed, scatter, pie, radar, radialBar, treemap, and funnel. Given the user input: ${inputData}, identify the chart type the user wants to display. Return just one word
 ```
 ```
 
 
+
+
+## 原理解析
+
+如用户输入: show me the data as a bar chart, Monday - 15 people, Tuesday -3,Wednesday -45, Thursday -124,Friday -2
+
+1、调用 openai 接口提取用户需要做的图表类型: bar 条形图
+
+2、调用 openai 接口生成json格式数组数据
+
+3、使用 react-chart 对生成的json作图
+
+
+总结,openai做了一个提取信息的任务,根据描述生成json数据两个任务。
+
+## 优化
+
+可以做成一个下拉框,免去第一步接口调用。