Open tsaneyoshi opened 1 month ago
@tsaneyoshi nope, that´s why i added it myself, see the example on top in the readme, it´s not perfect, but working....
@michabbb I try to install https://github.com/michabbb/gemini-php-sdk via composer.json on my Laravel app, but it doesn’t seem to work. Do you have any plans to publish it on Packagist?
@daiduong47 what´s your definition of "does not work" ? 😏 you put
"repositories": [
{
"type": "vcs",
"url": "https://github.com/michabbb/gemini-php-sdk.git"
}
],
into your composer.json and install the package as usual. right now I see many improvements here that are missing in my fork because my main focus was using some beta stuff which the owner always refused to implement (in the past).
@michabbb Thank you for your quick response. Below is the log I encountered, even though I followed your instructions as mentioned above. Of course, many other sources also guide similarly. I might have missed something. Please help me if possible, thank you.
composer require michabbb/gemini-php-sdk
In PackageDiscoveryTrait.php line 368:
Could not find a matching version of package michabbb/gemini-php-sdk. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev).
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--u
pdate-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
Also, I’m really interested in the file attachment and analysis feature you shared, especially with PDF files. I’ve moved from Python and am currently looking for a package with similar features as those native to Python packages. Although I think it’s hard to be as complete, the ease and friendliness of PHP always tempt us.
I hope we can collaborate in the future to further develop this feature here. Thank you again.
@daiduong47 as explained, you have to add the entry into your composer.json which tells composer: "I want this package to be installed from a different source".
so your command should be: composer require google-gemini-php/client:dev-main
Also, I’m really interested in the file attachment and analysis feature you shared, especially with PDF files.
exactly! this is an incredible feature of gemini and very underrated. the super long context window and the file-upload feature together is something many other don´t provide 😏
i do hope as well that this gets integrated here soon ❤️
for everybody else stumbling over this issue: here´s the plain code that shows how to upload files to the Gemini API.
@michabbb Thank you so much! The error was on my end, but I’ve successfully integrated it now.
Instead of running composer require google-gemini-php/client:dev-main
I mistakenly ran composer require michabbb/gemini-php-sdk:dev-main
Quite a funny and silly mistake.
Regarding this package, I noticed a few points that need further attention. I’ll be looking into the Python package and seeing what improvements I can make within my PHP capabilities. It was great talking with you. Thank you again!
Is the PDF file upload feature supported?