Skip to content
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

Google PaLM API #27

Closed
appatalks opened this issue May 16, 2023 · 5 comments
Closed

Google PaLM API #27

appatalks opened this issue May 16, 2023 · 5 comments

Comments

@appatalks
Copy link
Owner

appatalks commented May 16, 2023

I have early Access to this API Now.

Added hook with google-palm.js.

Quick and dirty added. Currently raw output to screen.

https://developers.generativeai.google/guide
https://developers.generativeai.google/api/python/google/generativeai/chat

@appatalks
Copy link
Owner Author

Need to add:

  1. local storage
  2. message array (memory)
  3. formatting
  4. tbd

@appatalks
Copy link
Owner Author

appatalks commented May 16, 2023

message array memory and formatting added.

Now I need to handle bad responses ie:

{
"messages": [
{
"author": "0",
"content": "Hi Steven! It's nice to meet you. How can I help you today?"
},
{
"author": "0",
"content": "Strawberry ice cream is a delicious and refreshing treat that is perfect for a hot summer day. It is made with fresh strawberries, cream, and sugar, and it has a light and fluffy texture. Strawberry ice cream is a popular flavor all over the world, and it is often served with whipped cream and a cherry on top.\r\n\r\nStrawberry ice cream is a good source of calcium and vitamin C. It is also a good source of antioxidants, which can help protect your cells from damage. Strawberry ice cream is a low-fat food, and it is a good source of protein.\r\n\r\nIf you are looking for a delicious and refreshing treat, strawberry ice cream is a great option. It is a healthy and nutritious food that is perfect for any time of day.\r\n\r\nHere are some fun facts about strawberry ice cream:\r\n\r\n* The first strawberry ice cream was made in France in the 17th century.\r\n* Strawberry ice cream is the most popular flavor of ice cream in the United States.\r\n* The average American eats about 20 pounds of ice cream per year.\r\n* The world's largest ice cream cone is 10 feet tall and weighs 1,000 pounds.\r\n* The world's largest ice cream sundae weighs 10,000 pounds and contains 100 gallons of ice cream.\r\n* The world's most expensive ice cream is made with edible gold and costs $250 per scoop.\r\n\r\nI hope you enjoy your strawberry ice cream!"
},
{
"author": "0",
"content": "Yes, I remember your name. You said your name is Steven. It's nice to meet you, Steven."
},
{
"author": "0",
"content": "What is your name?"
}
],
"filters": [
{
"reason": "OTHER"
}
]
}

@appatalks
Copy link
Owner Author

appatalks commented May 17, 2023

Memory is currently stored in the variables, so it wont clear unless we refresh. Need to have it save to local storage and recalled from local storage to allow the clear memory button to work.

Its also not quite right, only keeping the ai's response.

@appatalks
Copy link
Owner Author

Memory part is now good. Actually most of it should be good. Now just need to send a bunch of api calls to see where it might break next.

@appatalks
Copy link
Owner Author

Will reopen if any major challenges come up or need to track additional features.

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

No branches or pull requests

1 participant