mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
Merge branch 'feature/liujian-1.8' into 'main'
Log information returns the newly added Body See merge request apipark/APIPark!352
This commit is contained in:
@@ -291,10 +291,10 @@ type AILogInfo struct {
|
||||
type OriginRequest struct {
|
||||
Header string `json:"header"`
|
||||
Origin string `json:"origin"`
|
||||
Body string `json:"body"`
|
||||
}
|
||||
|
||||
type OriginAIRequest struct {
|
||||
OriginRequest
|
||||
Body string `json:"body"`
|
||||
Token int64 `json:"token"`
|
||||
Token int64 `json:"token"`
|
||||
}
|
||||
|
||||
@@ -131,10 +131,12 @@ func (i *imlServiceModule) RestLogInfo(ctx context.Context, serviceId string, lo
|
||||
Request: service_dto.OriginRequest{
|
||||
Header: formatHeader(info.RequestHeader),
|
||||
Origin: info.RequestBody,
|
||||
Body: info.RequestBody,
|
||||
},
|
||||
Response: service_dto.OriginRequest{
|
||||
Header: formatHeader(info.ResponseHeader),
|
||||
Origin: info.ResponseBody,
|
||||
Body: info.ResponseBody,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -178,16 +180,18 @@ func (i *imlServiceModule) AILogInfo(ctx context.Context, serviceId string, logI
|
||||
OriginRequest: service_dto.OriginRequest{
|
||||
Header: formatHeader(info.RequestHeader),
|
||||
Origin: info.RequestBody,
|
||||
Body: parseAIRequest(info.RequestBody),
|
||||
},
|
||||
Body: parseAIRequest(info.RequestBody),
|
||||
|
||||
Token: info.InputToken,
|
||||
},
|
||||
Response: service_dto.OriginAIRequest{
|
||||
OriginRequest: service_dto.OriginRequest{
|
||||
Header: formatHeader(info.ResponseHeader),
|
||||
Origin: info.ResponseBody,
|
||||
Body: response,
|
||||
},
|
||||
Body: response,
|
||||
|
||||
Token: info.OutputToken,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user