dify_llm 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,6 +83,7 @@ module RubyLLM
83
83
  def type
84
84
  return :file_id unless @upload_file_id.nil?
85
85
  return :image if image?
86
+ return :video if video?
86
87
  return :audio if audio?
87
88
  return :pdf if pdf?
88
89
  return :text if text?
@@ -94,6 +95,10 @@ module RubyLLM
94
95
  RubyLLM::MimeType.image? mime_type
95
96
  end
96
97
 
98
+ def video?
99
+ RubyLLM::MimeType.video? mime_type
100
+ end
101
+
97
102
  def audio?
98
103
  RubyLLM::MimeType.audio? mime_type
99
104
  end
@@ -29,6 +29,7 @@ module RubyLLM
29
29
  # Default models
30
30
  :default_model,
31
31
  :default_embedding_model,
32
+ :default_moderation_model,
32
33
  :default_image_model,
33
34
  # Model registry
34
35
  :model_registry_class,
@@ -57,6 +58,7 @@ module RubyLLM
57
58
 
58
59
  @default_model = 'gpt-4.1-nano'
59
60
  @default_embedding_model = 'text-embedding-3-small'
61
+ @default_moderation_model = 'omni-moderation-latest'
60
62
  @default_image_model = 'gpt-image-1'
61
63
 
62
64
  @model_registry_class = 'Model'
@@ -15,6 +15,10 @@ module RubyLLM
15
15
  type.start_with?('image/')
16
16
  end
17
17
 
18
+ def video?(type)
19
+ type.start_with?('video/')
20
+ end
21
+
18
22
  def audio?(type)
19
23
  type.start_with?('audio/')
20
24
  end
@@ -56,6 +56,10 @@ module RubyLLM
56
56
  modalities.input.include?('image')
57
57
  end
58
58
 
59
+ def supports_video?
60
+ modalities.input.include?('video')
61
+ end
62
+
59
63
  def supports_functions?
60
64
  function_calling?
61
65
  end