Skip to content

Commit

Permalink
apply suggestions from review
Browse files Browse the repository at this point in the history
Co-authored-by: TJ Miller <[email protected]>
  • Loading branch information
ChrisB-TL and sixlive authored Jan 23, 2025
1 parent a0b28fd commit 09135ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 2 additions & 7 deletions src/Concerns/ConfiguresProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,13 @@ public function usingProviderConfig(array $config): self
return $this;
}

public function getModel(): string
public function model(): string
{
return $this->model;
}

public function getProviderKey(): string
public function providerKey(): string
{
return $this->providerKey;
}

public function getProviderEnum(): ProviderEnum
{
return ProviderEnum::from($this->providerKey);
}
}
5 changes: 2 additions & 3 deletions tests/Text/PendingRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
$request = $this->pendingRequest
->using(Provider::OpenAI, 'gpt-4');

expect($request->getModel())->toBe('gpt-4');
expect($request->getProviderKey())->toBe('openai');
expect($request->getProviderEnum())->toBe(Provider::OpenAI);
expect($request->model())->toBe('gpt-4');
expect($request->providerKey())->toBe('openai');
});

test('it configures the client options', function (): void {
Expand Down

0 comments on commit 09135ed

Please sign in to comment.