Class: RcrewAI::Rails::KnowledgeSource
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- RcrewAI::Rails::KnowledgeSource
- Defined in:
- app/models/rcrewai/rails/knowledge_source.rb
Constant Summary collapse
- TYPE_MAP =
{ "string" => RCrewAI::Knowledge::StringSource, "file" => RCrewAI::Knowledge::FileSource, "pdf" => RCrewAI::Knowledge::PdfSource, "csv" => RCrewAI::Knowledge::CsvSource, "url" => RCrewAI::Knowledge::UrlSource, }.freeze
Instance Method Summary collapse
-
#to_rcrew_source ⇒ Object
Maps this row to the matching core Source object.
Instance Method Details
#to_rcrew_source ⇒ Object
Maps this row to the matching core Source object.
22 23 24 |
# File 'app/models/rcrewai/rails/knowledge_source.rb', line 22 def to_rcrew_source TYPE_MAP.fetch(source_type).new(value) end |