Sha256: d7524f66db71d8427ab79627367cafa310d5d0fc99736a673951cfab79eb8453

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

require "roseflow/interaction"

require_relative "../actions/initialize_vector_store"
require_relative "../actions/embed_repository"

class Interactions::PrepareVectorStore
  extend Roseflow::Interaction

  def self.call(context = {})
    with(context).reduce(actions)
  end

  def self.actions
    [
      InitializeVectorStore,
      reduce_if(->(ctx) { ctx.vector_store.has_embeddings? }, EmbedRepository)
    ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
roseflow-0.1.0 examples/github-repo-chat/lib/interactions/prepare_vector_store.rb