(model *internalregistry.ModelInfo)
| 227 | } |
| 228 | |
| 229 | func registryModelToPluginModel(model *internalregistry.ModelInfo) ModelInfo { |
| 230 | if model == nil { |
| 231 | return ModelInfo{} |
| 232 | } |
| 233 | return ModelInfo{ |
| 234 | ID: model.ID, |
| 235 | Object: model.Object, |
| 236 | Created: model.Created, |
| 237 | OwnedBy: model.OwnedBy, |
| 238 | Type: model.Type, |
| 239 | DisplayName: model.DisplayName, |
| 240 | Name: model.Name, |
| 241 | Version: model.Version, |
| 242 | Description: model.Description, |
| 243 | InputTokenLimit: int64(model.InputTokenLimit), |
| 244 | OutputTokenLimit: int64(model.OutputTokenLimit), |
| 245 | SupportedGenerationMethods: cloneStringSlice(model.SupportedGenerationMethods), |
| 246 | ContextLength: int64(model.ContextLength), |
| 247 | MaxCompletionTokens: int64(model.MaxCompletionTokens), |
| 248 | SupportedParameters: cloneStringSlice(model.SupportedParameters), |
| 249 | SupportedInputModalities: cloneStringSlice(model.SupportedInputModalities), |
| 250 | SupportedOutputModalities: cloneStringSlice(model.SupportedOutputModalities), |
| 251 | Thinking: thinkingSupportToPlugin(model.Thinking), |
| 252 | UserDefined: model.UserDefined, |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | func thinkingSupportToPlugin(thinking *internalregistry.ThinkingSupport) *ThinkingSupport { |
| 257 | if thinking == nil { |
no test coverage detected