|
@@ -26,8 +26,8 @@ type cQuestion struct {
|
|
}
|
|
}
|
|
|
|
|
|
type BaseQuestion struct {
|
|
type BaseQuestion struct {
|
|
- Prompt string `json:"prompt"`
|
|
|
|
- History []map[string]interface{} `json:"history"`
|
|
|
|
|
|
+ Prompt string `json:"prompt"`
|
|
|
|
+ History [][]string `json:"history"`
|
|
}
|
|
}
|
|
|
|
|
|
type QuestionReq struct {
|
|
type QuestionReq struct {
|
|
@@ -92,6 +92,7 @@ func (q *cQuestion) getIsbusinessData(ctx context.Context, code string) (bRes *B
|
|
// DetailQuestion 问题处理
|
|
// DetailQuestion 问题处理
|
|
func (q *cQuestion) DetailQuestion(ctx context.Context, qRes *QuestionReq) (reply string, from int, err error) {
|
|
func (q *cQuestion) DetailQuestion(ctx context.Context, qRes *QuestionReq) (reply string, from int, err error) {
|
|
cRes, err := ChatGpt.Do(ctx, qRes)
|
|
cRes, err := ChatGpt.Do(ctx, qRes)
|
|
|
|
+ g.Dump(qRes.Prompt, "---", cRes)
|
|
if err != nil {
|
|
if err != nil {
|
|
return "", 0, err
|
|
return "", 0, err
|
|
}
|
|
}
|
|
@@ -140,7 +141,6 @@ func (q *cQuestion) DetailQuestion(ctx context.Context, qRes *QuestionReq) (repl
|
|
UserId: jSession.UserId,
|
|
UserId: jSession.UserId,
|
|
Answer: bRes.Answer,
|
|
Answer: bRes.Answer,
|
|
BiddingId: infoId,
|
|
BiddingId: infoId,
|
|
- IsEnt: false,
|
|
|
|
BaseUserId: jSession.NewUid,
|
|
BaseUserId: jSession.NewUid,
|
|
})
|
|
})
|
|
if err != nil {
|
|
if err != nil {
|