Skip to content

Commit d0afd83

Browse files
committed
moving classes to a more component like structure
- add Wikipedia and YouTube namespace and moved applicable classes. this way the code is clustered by implementation making it easier to copy paste it to your own application.
1 parent 2817e66 commit d0afd83

File tree

13 files changed

+18
-18
lines changed

13 files changed

+18
-18
lines changed

src/Command/BlogEmbedCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace App\Command;
66

7-
use App\Blog\Embedder;
7+
use App\Rag\Blog\Embedder;
88
use Symfony\Component\Console\Attribute\AsCommand;
99
use Symfony\Component\Console\Command\Command;
1010
use Symfony\Component\Console\Input\InputInterface;

src/Blog/Embedder.php src/Rag/Blog/Embedder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Blog;
5+
namespace App\Rag\Blog;
66

77
use PhpLlm\LlmChain\Document\Metadata;
88
use PhpLlm\LlmChain\Document\TextDocument;

src/Blog/Loader.php src/Rag/Blog/Loader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Blog;
5+
namespace App\Rag\Blog;
66

77
use Symfony\Component\DomCrawler\Crawler;
88
use Symfony\Component\Uid\Uuid;

src/Blog/Post.php src/Rag/Blog/Post.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Blog;
5+
namespace App\Rag\Blog;
66

77
use Symfony\Component\Uid\Uuid;
88

src/Chat/Rag.php src/Rag/Chat/Rag.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Chat;
5+
namespace App\Rag\Chat;
66

77
use PhpLlm\LlmChain\ChainInterface;
88
use PhpLlm\LlmChain\Model\Message\Message;

src/Twig/RagComponent.php src/Rag/Twig/RagComponent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Twig;
5+
namespace App\Rag\Twig;
66

7-
use App\Chat\Rag;
7+
use App\Rag\Chat\Rag;
88
use PhpLlm\LlmChain\Model\Message\MessageBag;
99
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
1010
use Symfony\UX\LiveComponent\Attribute\LiveAction;

src/Chat/Wikipedia.php src/Wikipedia/Chat/Wikipedia.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Chat;
5+
namespace App\Wikipedia\Chat;
66

77
use PhpLlm\LlmChain\ChainInterface;
88
use PhpLlm\LlmChain\Model\Message\Message;

src/Twig/WikipediaComponent.php src/Wikipedia/Twig/WikipediaComponent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Twig;
5+
namespace App\Wikipedia\Twig;
66

7-
use App\Chat\Wikipedia;
7+
use App\Wikipedia\Chat\Wikipedia;
88
use PhpLlm\LlmChain\Model\Message\MessageBag;
99
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
1010
use Symfony\UX\LiveComponent\Attribute\LiveAction;

src/Chat/YouTube.php src/YouTube/Chat/YouTube.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Chat;
5+
namespace App\YouTube\Chat;
66

77
use App\YouTube\TranscriptFetcher;
88
use PhpLlm\LlmChain\ChainInterface;

src/Twig/YouTubeComponent.php src/YouTube/Twig/YouTubeComponent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Twig;
5+
namespace App\YouTube\Twig;
66

7-
use App\Chat\YouTube;
7+
use App\YouTube\Chat\YouTube;
88
use PhpLlm\LlmChain\Model\Message\MessageBag;
99
use Psr\Log\LoggerInterface;
1010
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;

tests/Blog/LoaderTest.php tests/Rag/Blog/LoaderTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Tests\Blog;
5+
namespace App\Tests\Rag\Blog;
66

7-
use App\Blog\Loader;
8-
use App\Blog\Post;
7+
use App\Rag\Blog\Loader;
8+
use App\Rag\Blog\Post;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\UsesClass;
1111
use PHPUnit\Framework\TestCase;

tests/Blog/PostTest.php tests/Rag/Blog/PostTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Tests\Blog;
5+
namespace App\Tests\Rag\Blog;
66

7-
use App\Blog\Post;
7+
use App\Rag\Blog\Post;
88
use PHPUnit\Framework\Attributes\CoversClass;
99
use PHPUnit\Framework\TestCase;
1010
use Symfony\Component\Uid\Uuid;
File renamed without changes.

0 commit comments

Comments
 (0)