Skip to content

Getting Started


Llama can be installed using pip, the package manager for Python. To install Llama, open a command prompt and type:

pip install llama-llm

This will download and install the latest version of Llama and its dependencies.

Check if your installation was done correctly, by importing the LLM engine in your python interpreter.

>> from llama import LLM

Setup your keys

Go to Log in to get your API key and purchase credits.

Create ~/.powerml/configure_llama.yaml and put a key in it.

    key: "<YOUR-KEY-HERE>"

See the Authentication page for more advanced options.

Basic test

Run the LLM engine with a basic test to see if installation and authentication were set up correctly.

from llama import LLM, Type, Context

class Test(Type):
    test_string: str = Context("just a test")

llm = LLM(name="my_test")

test = Test(test_string="testing 123")
llm(test, output_type=Test)

Now you're on your way to using the LLM engine on your specific use case!

Try an example