<?php
// 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


declare(strict_types=1);

namespace Kreuzberg\E2e;

use PHPUnit\Framework\TestCase;
use Kreuzberg\Kreuzberg;
use Kreuzberg\EmbeddingConfig;
use Kreuzberg\ExtractionConfig;

/** E2e tests for category: embeddings. */
final class EmbeddingsTest extends TestCase
{

    /** embed_texts: multilingual preset */
    public function test_embed_texts_different_preset(): void
    {
        $config = \Kreuzberg\EmbeddingConfig::from_json(json_encode(["model" => ["name" => "multilingual", "type" => "preset"]]));
        $result = Kreuzberg::embedTexts(["Hello world", "Test"], $config);

        $this->assertGreaterThanOrEqual(2, count($result));

    }


    /** get_embedding_preset: known preset */
    public function test_get_embedding_preset_known(): void
    {
        $this->expectNotToPerformAssertions();
        $result = Kreuzberg::getEmbeddingPreset("balanced");


    }


    /** get_embedding_preset: nominal case */
    public function test_get_embedding_preset_nominal(): void
    {
        $this->expectNotToPerformAssertions();
        $result = Kreuzberg::getEmbeddingPreset("balanced");


    }


    /** get_embedding_preset: unknown preset fails */
    public function test_get_embedding_preset_unknown(): void
    {
        $result = Kreuzberg::getEmbeddingPreset("nonexistent-xyz");

            $this->assertEmpty($result);


    }


    /** list_embedding_presets: returns at least one */
    public function test_list_embedding_presets_sanity(): void
    {
        $result = Kreuzberg::listEmbeddingPresets();

            $this->assertNotEmpty($result);


    }

}
