diff --git a/Modules/LlmDriver/app/OllamaClient.php b/Modules/LlmDriver/app/OllamaClient.php index 1c4ad594..3a4211aa 100644 --- a/Modules/LlmDriver/app/OllamaClient.php +++ b/Modules/LlmDriver/app/OllamaClient.php @@ -268,8 +268,7 @@ public function onQueue(): string } /** - * @param MessageInDto[] $messages - * @return array + * @param MessageInDto[] $messages */ public function remapMessages(array $messages): array { diff --git a/Modules/LlmDriver/app/Orchestrate.php b/Modules/LlmDriver/app/Orchestrate.php index ff624de7..1b0523e9 100644 --- a/Modules/LlmDriver/app/Orchestrate.php +++ b/Modules/LlmDriver/app/Orchestrate.php @@ -13,7 +13,6 @@ use Illuminate\Support\Facades\Log; use LlmLaraHub\LlmDriver\Functions\FunctionCallDto; use LlmLaraHub\LlmDriver\Helpers\CreateReferencesTrait; -use LlmLaraHub\LlmDriver\Requests\MessageInDto; use LlmLaraHub\LlmDriver\Responses\FunctionResponse; /** diff --git a/Modules/LlmDriver/tests/Feature/ClaudeClientTest.php b/Modules/LlmDriver/tests/Feature/ClaudeClientTest.php index d1a545de..105a7918 100644 --- a/Modules/LlmDriver/tests/Feature/ClaudeClientTest.php +++ b/Modules/LlmDriver/tests/Feature/ClaudeClientTest.php @@ -15,7 +15,6 @@ use LlmLaraHub\LlmDriver\Functions\PropertyDto; use LlmLaraHub\LlmDriver\Requests\MessageInDto; use LlmLaraHub\LlmDriver\Responses\CompletionResponse; -use LlmLaraHub\LlmDriver\Responses\EmbeddingsResponseDto; use Tests\TestCase; class ClaudeClientTest extends TestCase @@ -28,8 +27,6 @@ public function setUp(): void Setting::factory()->all_have_keys()->create(); } - - public function test_completion(): void { $client = new ClaudeClient(); diff --git a/Modules/LlmDriver/tests/Feature/MockClientTest.php b/Modules/LlmDriver/tests/Feature/MockClientTest.php index 49a1ceec..fc0cb90d 100644 --- a/Modules/LlmDriver/tests/Feature/MockClientTest.php +++ b/Modules/LlmDriver/tests/Feature/MockClientTest.php @@ -36,7 +36,7 @@ public function test_tool_with_limit(): void 'content' => 'test', 'role' => 'user', ]), - ['search_and_summarize'] + ['search_and_summarize'], ]); $this->assertCount(1, $results); diff --git a/app/Models/Chat.php b/app/Models/Chat.php index 840add9b..5b77cae1 100644 --- a/app/Models/Chat.php +++ b/app/Models/Chat.php @@ -22,8 +22,8 @@ */ class Chat extends Model implements HasDrivers { - use HasFactory; use HasDriversTrait; + use HasFactory; protected $guarded = []; diff --git a/app/Models/Collection.php b/app/Models/Collection.php index e4c86ddb..62a83cd3 100644 --- a/app/Models/Collection.php +++ b/app/Models/Collection.php @@ -28,8 +28,8 @@ */ class Collection extends Model implements HasDrivers, TaggableContract { - use HasFactory; use HasDriversTrait; + use HasFactory; use Taggable; protected $guarded = []; diff --git a/app/Models/Document.php b/app/Models/Document.php index d6d6dc18..838b5089 100644 --- a/app/Models/Document.php +++ b/app/Models/Document.php @@ -37,9 +37,9 @@ */ class Document extends Model implements HasDrivers, TaggableContract { + use HasDriversTrait; use HasFactory; use Taggable; - use HasDriversTrait; protected $guarded = []; diff --git a/app/Models/DocumentChunk.php b/app/Models/DocumentChunk.php index 865d5c5e..4ea72e94 100644 --- a/app/Models/DocumentChunk.php +++ b/app/Models/DocumentChunk.php @@ -19,9 +19,9 @@ */ class DocumentChunk extends Model implements HasDrivers, TaggableContract { + use HasDriversTrait; use HasFactory; use HasNeighbors; - use HasDriversTrait; use Taggable; protected $casts = [ diff --git a/app/Models/Message.php b/app/Models/Message.php index 379cd500..5092abb3 100644 --- a/app/Models/Message.php +++ b/app/Models/Message.php @@ -24,8 +24,8 @@ class Message extends Model implements HasDrivers { - use HasFactory; use HasDriversTrait; + use HasFactory; public $fillable = [ 'body', @@ -183,8 +183,6 @@ public function getChatable(): HasDrivers return $this->chat->getChatable(); } - - public function getChat(): ?Chat { return $this->chat; @@ -284,6 +282,4 @@ protected function batchJob(array $jobs, Chat $chat, string $function): void ->allowFailures() ->dispatch(); } - - } diff --git a/app/Models/Report.php b/app/Models/Report.php index 21107f49..fcb3b618 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -18,8 +18,8 @@ */ class Report extends Model implements HasDrivers { - use HasFactory; use HasDriversTrait; + use HasFactory; use SoftDeletes; protected $guarded = []; diff --git a/app/Models/Source.php b/app/Models/Source.php index 95307cd2..54fcd137 100644 --- a/app/Models/Source.php +++ b/app/Models/Source.php @@ -20,9 +20,9 @@ */ class Source extends Model implements HasDrivers { + use HasDriversTrait; use HasFactory; use SoftDeletes; - use HasDriversTrait; protected $guarded = []; @@ -50,7 +50,6 @@ public function getPrompt(): string return $this->details; } - public function getChatable(): HasDrivers { return $this->collection; @@ -86,8 +85,6 @@ public function chat(): BelongsTo return $this->belongsTo(Chat::class); } - - public function getEmbeddingDriver(): string { return $this->collection->getEmbeddingDriver();