-
Notifications
You must be signed in to change notification settings - Fork 52
Add support to add systemInstruction and update API to V1Beta #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <img src="https://raw.githubusercontent.com/alexandrevega/gemini-api-client/main/assets/example.png" width="800" alt="Gemini API PHP Client - Example"> | ||
| </p> | ||
| <p align="center"> | ||
| <a href="https://packagist.org/packages/gemini-api-php/client"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/gemini-api-php/client"></a> | ||
| <a href="https://packagist.org/packages/gemini-api-php/client"><img alt="Latest Version" src="https://img.shields.io/packagist/v/gemini-api-php/client"></a> | ||
| <a href="https://packagist.org/packages/gemini-api-php/client"><img alt="License" src="https://img.shields.io/github/license/gemini-api-php/client"></a> | ||
| <a href="https://packagist.org/packages/galexandrevega/gemini-api-client"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/alexandrevega/gemini-api-client"></a> | ||
| <a href="https://packagist.org/packages/alexandrevega/gemini-api-client"><img alt="Latest Version" src="https://img.shields.io/packagist/v/alexandrevega/gemini-api-client"></a> | ||
| <a href="https://packagist.org/packages/alexandrevega/gemini-api-client"><img alt="License" src="https://img.shields.io/github/license/alexandrevega/gemini-api-client"></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
| This library is a fork of [gemini-api-php/client](https://github.com/gemini-api-php/client) adding system instructions and updating api to v1beta. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
| _This library is not developed or endorsed by Google._ | ||
|
|
||
| - Erdem Köse - **[github.com/erdemkose](https://github.com/erdemkose)** | ||
| - Alexandre Vega - **[github.com/alexandrevega](https://github.com/alexandrevega)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
|
|
||
| ```shell | ||
| composer require gemini-api-php/client | ||
| composer require alexandrevega/gemini-api-client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "name": "gemini-api-php/client", | |||
| "name": "alexandrevega/gemini-api-client", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
| }, | ||
| { | ||
| "name": "Carlos Ramos", | ||
| "email": "contact@cramos.dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes do not apply to this project
| } | ||
|
|
||
| /** | ||
| /**x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
| } | ||
|
|
||
| curl_setopt($ch, CURLOPT_URL, "{$this->baseUrl}/v1/{$request->getOperation()}"); | ||
| curl_setopt($ch, CURLOPT_URL, "{$this->baseUrl}/v1beta/{$request->getOperation()}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the version be configurable ?
|
Thanks for the PR. Fixed in #57 with similar approach. |
Added support for system instruction (using method withSystemInstruction(string $systemInstruction))
Updated url from ´v1´to ´v1beta´ in order to support this feature.
It would be easily adaptable to support multiple system instructions extending the current methods.
This should resolve #46