Closed Crystal-Spider closed 1 year ago
I don't think we have a module named palm-api. We can access API using get method which is different from downloading a module.
But in your readme there is an example to import it: import PaLM from "palm-api";
Never mind that in my previous comment there are curly brackets around PaLM
, the error is the same regardless.
What I believe to be the issue is that this API only supports plain JavaScript; TypeScript strict then gives off an error because there are no types in the module, and so everything would be any
.
Yes, I am aware that we currently do not have TypeScript support. You are welcome to add it yourself through a pull request (PR). I have a number of other tasks on my plate at the moment, so I may not be able to address it immediately. Apologies for any inconvenience! 😅
Sure thing, do you have any code-style rules you'd like me to follow?
Nope, do whatever you are comfortable with. Thank you so much!
In this section, is this correct?
Any model capable of
generateText
. Default:embedding-gecko-001
.
Shouldn't it say embedText
?
Ah, you got me there... it is 😅
I'm basically done, I just need to check if I configured everything correctly to be packaged with npm and still work properly, but I'm going to do it tomorrow since it's now 01:30 am where I live ahah
No worries, take your time...
I opened a PR: #3
Wow, this is amazingly done... higher quality than anything I could ship 🤣
Honestly, I was just expecting .d.ts file, but this is better! I'm assuming you've tested everything?
Unfortunately I couldn't test because I'm still on the waiting list for PaLM API and MakerSuite :/
Theoretically, no working should have changed, as all the work I did was mainly to add types. Of course I do agree that testing it out would be better ahah
What I'm actually unsure is whether I correctly setup the project to be published and used by others, but I wouldn't know how to test this.
Do you think you can find the time to test it out, merge the PR, and release a new version?
Hello! Any update on this? Unfortunately I still haven't been granted access to the PaLM API.
Hello! Any update on this? Unfortunately I still haven't been granted access to the PaLM API.
I'm trying to use this API in a TypeScript strict project.
I try to import
PaLM
by doingimport {PaLM} from 'palm-api';
, however this gives the following error:The command
npm i --save-dev @types/palm-api
gives E404.Would it be possible to add support for TypeScript?