Skip to content

Commit cd73bce

Browse files
fix(tests): complete Model struct initialization for issue Michael-A-Kuykendall#113
- Add missing optional fields (permission, root, parent) to all Model test initializations - Fixes compilation errors in test_models_response_structure and test_openai_response_structures - All 24 openai_compat tests now passing - Ensures regression test for Open WebUI/AnythingLLM compatibility works correctly Completes fix for Issue Michael-A-Kuykendall#113 Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
1 parent 37f67ac commit cd73bce

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/openai_compat.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,12 +689,18 @@ mod tests {
689689
object: "model".to_string(),
690690
created: 1234567890,
691691
owned_by: "shimmy".to_string(),
692+
permission: None,
693+
root: None,
694+
parent: None,
692695
},
693696
Model {
694697
id: "model2".to_string(),
695698
object: "model".to_string(),
696699
created: 1234567890,
697700
owned_by: "shimmy".to_string(),
701+
permission: None,
702+
root: None,
703+
parent: None,
698704
},
699705
],
700706
};
@@ -1006,12 +1012,18 @@ mod tests {
10061012
object: "model".to_string(),
10071013
created: 0,
10081014
owned_by: "shimmy".to_string(),
1015+
permission: None,
1016+
root: None,
1017+
parent: None,
10091018
},
10101019
Model {
10111020
id: "test-model-2".to_string(),
10121021
object: "model".to_string(),
10131022
created: 0,
10141023
owned_by: "shimmy".to_string(),
1024+
permission: None,
1025+
root: None,
1026+
parent: None,
10151027
},
10161028
],
10171029
};

0 commit comments

Comments
 (0)