Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use Meta Llama models via the official API
export LLAMA_API_KEY="la-..."
from ai_query import generate_text from ai_query.providers import llama result = await generate_text( model=llama("llama-3.1-70b-instruct"), prompt="Explain quantum computing." )
llama-3.1-405b-instruct
llama-3.1-70b-instruct
llama-3.1-8b-instruct
llama-3.2-90b-vision-instruct
llama-3.2-11b-vision-instruct
result = await generate_text( model=llama("llama-3.1-70b-instruct"), prompt="Write a story.", provider_options={ "llama": { "temperature": 0.9, "max_tokens": 1000 } } )
from ai_query import generate_text from ai_query.providers import llama, tool, Field @tool(description="Get stock price") async def get_stock(symbol: str = Field(description="Stock symbol")) -> str: return f"{symbol}: $150.00" result = await generate_text( model=llama("llama-3.1-70b-instruct"), prompt="What is the price of AAPL?", tools={"get_stock": get_stock} )
from ai_query import stream_text from ai_query.providers import llama result = stream_text( model=llama("llama-3.1-70b-instruct"), prompt="Write a song." ) async for chunk in result.text_stream: print(chunk, end="", flush=True)
Was this page helpful?