-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ClientInterface and use request header instead of query parameter
- Loading branch information
Showing
3 changed files
with
56 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeminiAPI; | ||
|
||
use GeminiAPI\Enums\ModelName; | ||
use GeminiAPI\Requests\CountTokensRequest; | ||
use GeminiAPI\Requests\GenerateContentRequest; | ||
use GeminiAPI\Responses\CountTokensResponse; | ||
use GeminiAPI\Responses\GenerateContentResponse; | ||
use GeminiAPI\Responses\ListModelsResponse; | ||
|
||
/** | ||
* @since v1.1.0 | ||
*/ | ||
interface ClientInterface | ||
{ | ||
public const API_KEY_HEADER_NAME = 'x-goog-api-key'; | ||
|
||
public function countTokens(CountTokensRequest $request): CountTokensResponse; | ||
public function generateContent(GenerateContentRequest $request): GenerateContentResponse; | ||
public function generativeModel(ModelName $modelName): GenerativeModel; | ||
public function listModels(): ListModelsResponse; | ||
public function withBaseUrl(string $baseUrl): self; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters