Commit 34adab5
committed
feat(model): support specific model parameter in CommonModel
Add specific_model parameter to CommonModel class and implement logic to handle string input for model function. The changes allow specifying a particular model when creating CommonModel instances and ensure the specific model is used when available.
The model function now properly handles string inputs by converting them to appropriate model objects through ModelClient, and includes the specific_model in the returned CommonModel instance.
fixes issue with model selection when using string-based model references
feat(model): 在 CommonModel 中支持 specific model 参数
向 CommonModel 类添加 specific_model 参数并实现处理模型函数的字符串输入的逻辑。这些更改允许在创建 CommonModel 实例时指定特定模型,并确保在可用时使用特定模型。
模型函数现在通过 ModelClient 正确处理字符串输入并将它们转换为适当的模型对象,并在返回的 CommonModel 实例中包含 specific_model。
解决了使用基于字符串的模型引用时的模型选择问题
Change-Id: Ic4c853923510fe28eac7b5b84242e3be23474fa8
Signed-off-by: OhYee <oyohyee@oyohyee.com>1 parent f377b0d commit 34adab5
2 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
0 commit comments