mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 12:47:28 +08:00
add plugin: ai-rag (#1038)
This commit is contained in:
26
plugins/wasm-go/extensions/ai-rag/dashvector/types.go
Normal file
26
plugins/wasm-go/extensions/ai-rag/dashvector/types.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package dashvector
|
||||
|
||||
// DashVecotor document search: Request
|
||||
type Request struct {
|
||||
TopK int32 `json:"topk"`
|
||||
OutputFileds []string `json:"output_fileds"`
|
||||
Vector []float32 `json:"vector"`
|
||||
}
|
||||
|
||||
// DashVecotor document search: Response
|
||||
type Response struct {
|
||||
Code int32 `json:"code"`
|
||||
RequestID string `json:"request_id"`
|
||||
Message string `json:"message"`
|
||||
Output []OutputObject `json:"output"`
|
||||
}
|
||||
|
||||
type OutputObject struct {
|
||||
ID string `json:"id"`
|
||||
Fields FieldObject `json:"fields"`
|
||||
Score float32 `json:"score"`
|
||||
}
|
||||
|
||||
type FieldObject struct {
|
||||
Raw string `json:"raw"`
|
||||
}
|
||||
Reference in New Issue
Block a user