victordibia / llmx

An API for Chat Fine-Tuned Large Language Models (llm)
MIT License
72 stars 27 forks source link

Please add support for Makersuite PALM api #4

Closed sumukhakaparthi closed 10 months ago

sumukhakaparthi commented 10 months ago

Hi, could you please add support for Makersuite PALM API (https://makersuite.google.com/)? Thank you for previously adding support for Vertex AI PALM API.

Thanks in advance

victordibia commented 10 months ago

Great idea, will raise a PR once I have an update

victordibia commented 10 months ago

Added support for Makersuite. Give it a try!

palm_gen = llm(
    provider="palm",
    api_key=os.environ["PALM_API_KEY"],
)
palm_config = TextGenerationConfig(
    model="chat-bison-001", temperature=0, use_cache=True
)
palm_response = palm_gen.generate(messages, config=palm_config)
print(palm_response.text[0].content)