Skip to content

Conversation

@alexandrevega
Copy link

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

Comment on lines +2 to +7
<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>

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

Comment on lines +12 to +13
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.

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)**

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

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",

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

Comment on lines +20 to +23
},
{
"name": "Carlos Ramos",
"email": "contact@cramos.dev"

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

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()}");

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 ?

@erdemkose
Copy link
Collaborator

Thanks for the PR. Fixed in #57 with similar approach.

@erdemkose erdemkose closed this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There doesn't seem to be a way to add systemInstructions for assistant like functionality.

3 participants