# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
# frozen_string_literal: true

require 'kreuzberg'
require 'json'
require 'spec_helper'

RSpec.describe 'embed_async_pending' do
  it 'embed_texts_async_empty_input: embed_texts_async: empty text list' do
    result = Kreuzberg.embed_texts_async([])
    expect(result.length).to eq(0)

    expect(result).not_to be_nil
  end

  it 'embed_texts_async_happy: embed_texts_async: basic async embedding' do
    result = Kreuzberg.embed_texts_async(['First', 'Second'])
    expect(result.length).to be >= 2

    expect(result).not_to be_nil
  end

  it 'embed_texts_async_preset_switch: embed_texts_async: preset override' do
    result = Kreuzberg.embed_texts_async(['Text'], {model: { 'name' => 'balanced', 'type' => 'preset' }})

    expect(result).not_to be_nil
  end
end
