llm_container.go 838 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package llm
  2. import (
  3. "yunion.io/x/pkg/util/sets"
  4. "yunion.io/x/onecloud/pkg/apis"
  5. )
  6. type LLMContainerType string
  7. const (
  8. LLM_CONTAINER_OLLAMA LLMContainerType = "ollama"
  9. LLM_CONTAINER_VLLM LLMContainerType = "vllm"
  10. LLM_CONTAINER_DIFY LLMContainerType = "dify"
  11. LLM_CONTAINER_COMFYUI LLMContainerType = "comfyui"
  12. LLM_CONTAINER_OPENCLAW LLMContainerType = "openclaw"
  13. )
  14. var (
  15. LLM_CONTAINER_TYPES = sets.NewString(
  16. string(LLM_CONTAINER_OLLAMA),
  17. string(LLM_CONTAINER_VLLM),
  18. string(LLM_CONTAINER_DIFY),
  19. string(LLM_CONTAINER_COMFYUI),
  20. string(LLM_CONTAINER_OPENCLAW),
  21. )
  22. )
  23. func IsLLMContainerType(t string) bool {
  24. return LLM_CONTAINER_TYPES.Has(t)
  25. }
  26. type LLMContainerCreateInput struct {
  27. apis.VirtualResourceCreateInput
  28. LLMId string `json:"llm_id"`
  29. Type string `json:"type"`
  30. CmpId string `json:"cmp_id"`
  31. }