Commit 161c967
committed
Fix: Reconstruct args as HashMap for FunctionCallPartDto mapping
Addresses a persistent and perplexing compilation type mismatch error in PhotoReasoningMappers.kt when mapping FunctionCallPartDto to the SDK's FunctionCallPart. Despite types appearing identical (Map<String, String?>?), the compiler continued to report a mismatch for the 'args' field.
This commit modifies the `PartDto.toSdk()` function for the `FunctionCallPartDto` case. Instead of previous reconstruction methods, `this.args` (if not null) is now used to populate a new, explicitly created `HashMap<String, String?>`. This `HashMap` instance is then passed to the SDK's `FunctionCallPart` constructor.
This change aims to provide a very concrete and standard `Map` implementation to the SDK, potentially resolving any subtle type incompatibilities or compiler inference issues that previous casting or `toMap()` reconstructions did not.1 parent ce7d634 commit 161c967
1 file changed
Lines changed: 5 additions & 6 deletions
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
0 commit comments