- Changed the type of `Document` in `XinRerankResponseDocument` from `string` to `any` to accommodate various data types. - Updated the `RerankHandler` to handle `Document` as `any`, ensuring proper assignment based on its actual type. These modifications enhance the handling of document data, allowing for greater versatility in response structures.
12 lines
291 B
Go
12 lines
291 B
Go
package xinference
|
|
|
|
type XinRerankResponseDocument struct {
|
|
Document any `json:"document,omitempty"`
|
|
Index int `json:"index"`
|
|
RelevanceScore float64 `json:"relevance_score"`
|
|
}
|
|
|
|
type XinRerankResponse struct {
|
|
Results []XinRerankResponseDocument `json:"results"`
|
|
}
|