-
-
Notifications
You must be signed in to change notification settings - Fork 7
Large Language Models
Mika Hämäläinen edited this page Nov 2, 2024
·
11 revisions
UralicNLP provides a seamless, unified interface to access a variety of powerful large language models, eliminating the need for separate installations or complex setups. With UralicNLP, you can effortlessly switch between different LLMs, saving time and simplifying your workflow while gaining the flexibility to work with the model that best suits your needs—all through a single, streamlined platform.
To put it simply, you can just do:
llm.prompt("my fancy prompt")
>>"Result from LLM"
To use ChatGPT, you need to pip install openai
from uralicNLP.llm import get_llm
llm = get_llm("chatgpt", "YOUR API KEY", model="gpt-4o")
llm.prompt("What is Skolt Sami?")
>>"Skolt Sami is a Uralic, Sami language spoken by the Skolt Sami people, a small indigenous Finno-Ugric ethnic group ..."
To use Gemini, you need to pip install google-generativeai
. Get the API key from AI Studio.
from uralicNLP.llm import get_llm
llm = get_llm("gemini", "YOUR API KEY", model="gemini-1.5-flash")
llm.prompt("What is Erzya?")
>>"Erzya is a **Finno-Ugric language** and the **cultural identity** of the **Erzya people**, one of the two main groups within the Mordvinic people. ..."
UralicNLP is an open-source Python library by Mika Hämäläinen