What is the difference between vertexai.preview.language_models and google-generativeai?

Good day @morpheus ,

Welcome to Google Cloud Community!

  1. The google.generativeai is more general and can be used to perform a variety of generative AI tasks such as generation of text, embedding and chat services, whereas the vertexai.preview.language_models is used to access the preview language models of PALM API in vertex AI. (E.g. migration from Azure OpenAi to Palm API).
    For more information you can check this link: https://cloud.google.com/vertex-ai/docs/generative-ai/migrate-from-azure
    Gemini API reference  |  Google AI for Developers
    https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview

  2. Please note that it is still in public preview and currently it is only available in the United States. If you want to have access to this public preview, you can use this link to register in the waitlist: https://makersuite.google.com/waitlist
    For more information about the public preivew, you can check this link:
    https://developers.generativeai.google/guide/preview_faq

Hope this helps!

1 Like