instantmodel.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package llm
  2. import (
  3. "yunion.io/x/onecloud/pkg/apis"
  4. )
  5. type InstantModelListInput struct {
  6. apis.SharableVirtualResourceListInput
  7. apis.EnabledResourceBaseListInput
  8. ModelName string `json:"model_name"`
  9. ModelTag string `json:"model_tag"`
  10. ModelId string `json:"model_id"`
  11. Image string `json:"image"`
  12. Mounts string `json:"mounts"`
  13. AutoCache *bool `json:"auto_cache"`
  14. }
  15. type InstantModelImportInput struct {
  16. ModelName string `json:"model_name"`
  17. ModelTag string `json:"model_tag"`
  18. LlmType LLMContainerType `json:"llm_type"`
  19. }
  20. type InstantModelCreateInput struct {
  21. apis.SharableVirtualResourceCreateInput
  22. apis.EnabledBaseResourceCreateInput
  23. LlmType LLMContainerType `json:"llm_type"`
  24. ModelName string `json:"model_name"`
  25. ModelTag string `json:"model_tag"`
  26. ImageId string `json:"image_id"`
  27. Size int64 `json:"size"`
  28. ModelId string `json:"model_id"`
  29. ActualSizeMb int32 `json:"actual_size_mb"`
  30. Mounts []string `json:"mounts"`
  31. DoNotImport *bool `json:"do_not_import,omitempty"`
  32. }
  33. type InstantModelUpdateInput struct {
  34. apis.SharableVirtualResourceBaseUpdateInput
  35. ImageId string `json:"image_id"`
  36. Size int64 `json:"size"`
  37. ActualSizeMb int32 `json:"actual_size_mb"`
  38. Mounts []string `json:"mounts"`
  39. }
  40. type InstantModelDetails struct {
  41. apis.SharableVirtualResourceDetails
  42. Image string `json:"image"`
  43. CacheCount int `json:"cache_count"`
  44. CachedCount int `json:"cached_count"`
  45. IconBase64 string `json:"icon_base64"`
  46. MountedByLLMs []MountedByLLMInfo `json:"mounted_by_llms"`
  47. GPUMemoryRequired int64 `json:"gpu_memory_required"`
  48. }
  49. type MountedByLLMInfo struct {
  50. LlmId string `json:"llm_id"`
  51. LlmName string `json:"llm_name"`
  52. }
  53. type InstantModelSyncstatusInput struct {
  54. }
  55. type InstantAppCacheInput struct {
  56. }
  57. type InstantModelEnableAutoCacheInput struct {
  58. AutoCache bool `json:"auto_cache"`
  59. }
  60. type MountedModelResourceListInput struct {
  61. MountedModels []string `json:"mounted_models"`
  62. }
  63. type MountedModelResourceCreateInput struct {
  64. MountedModels []string `json:"mounted_models"`
  65. }
  66. type MountedModelResourceUpdateInput struct {
  67. MountedModels []string `json:"mounted_models"`
  68. }