Commit f27899a
authored
# Pull Request Template
## Description
This pull request updates the handling of the `Document` property in the
`RerankScore` class and its deserialization logic to consistently use a
`string` type instead of a generic `object`. This change simplifies the
type system and ensures that document content or identifiers are always
represented as strings which is returned by the service.
Type consistency and deserialization improvements:
* Changed the `Document` property in the `RerankScore` class from
`object` to `string`, and updated the constructor accordingly to require
a `string` document.
[[1]](diffhunk://#diff-8278775c5227f8e0f3aa61d4b0a96434387143cde3ea6a4e1d4445362a559530L21-R21)
[[2]](diffhunk://#diff-8278775c5227f8e0f3aa61d4b0a96434387143cde3ea6a4e1d4445362a559530L39-R39)
* Updated the deserialization logic in `DeserializeSemanticRerankResult`
to always store the document as a string, either by using the raw JSON
text for objects or the string value directly, ensuring type consistency
throughout the codebase.
## Type of change
Please delete options that are not relevant.
- [] Bug fix (non-breaking change which fixes an issue)
## Closing issues
To automatically close an issue: closes #IssueNumber
1 parent 17cfb96 commit f27899a
File tree
3 files changed
+14
-12
lines changed- Microsoft.Azure.Cosmos
- src/Inference
- tests/Microsoft.Azure.Cosmos.Tests/Contracts
3 files changed
+14
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1452 | 1452 | | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | | - | |
| 1455 | + | |
1456 | 1456 | | |
1457 | 1457 | | |
1458 | | - | |
| 1458 | + | |
1459 | 1459 | | |
1460 | | - | |
| 1460 | + | |
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
1465 | | - | |
| 1465 | + | |
1466 | 1466 | | |
1467 | | - | |
| 1467 | + | |
1468 | 1468 | | |
1469 | 1469 | | |
1470 | | - | |
| 1470 | + | |
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| |||
0 commit comments