A simple set of tools to access llm apis
Project description
llmprototyping
llmprototyping
is a Python package designed to provide easy and uniform access to various large language model (LLM) and embedding APIs, along with basic functionality for building small-scale artificial intelligence applications.
Features
- Uniform API Access: Simplify your interactions with different LLM and embedding APIs using a single interface.
- Basic AI Application Tools: Get started quickly with tools designed to support the development of AI applications.
License
Apache License Version 2.0
Compatibility
python 3.9+
Installation
pip install llmprototyping
Usage
from dotenv import load_dotenv
load_dotenv()
groq_api_key = os.getenv('GROQ_API_KEY')
import llmprototyping as llmp
factory = llmp.LLMChatCompletionFactory
model = factory.build('groq/Llama3-70b-8192', {'api_key': groq_api_key})
msg = llmp.Message(content="De qué color es el caballo blanco de Santiago? Responde en json.")
resp = model.query([msg], json_response=True, temperature=0)
resp.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llmprototyping-0.1.0.dev1.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for llmprototyping-0.1.0.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fbe96decf6b150b6ee6b7f9197b15bf5f4f71920960419575bcf9089dc5b7c4 |
|
MD5 | 9321d0abf12259d013ac50a19cca172c |
|
BLAKE2b-256 | 4b95f4795551bff6797a830d25f6a235e3b1f3901b771b640cc007ebc44b00a0 |
Close
Hashes for llmprototyping-0.1.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4eb91503697a8a9621de9958d846eb2c7c44616864f44eeaf0f39aed04eef2c |
|
MD5 | 8c40aa4f8b047d55139151baa062658c |
|
BLAKE2b-256 | ff22f8351ea6a58ed0ebe3759e3dd32a97f1c2684e01f724e38c10f6df2c39fe |