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
import os
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.dev2.tar.gz
(11.5 kB
view hashes)
Built Distribution
Close
Hashes for llmprototyping-0.1.0.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 268ef06bbb1d27238bf09e089ee9153b4f892230ca5e1876a67740aa8213ff2a |
|
MD5 | cfe5e74ddf10890ad169f32f3fa7cd0c |
|
BLAKE2b-256 | f7f66d4754b2d3bb17bb69d0308d8fcf5d1181acf3806c8258510ecc3d9e6276 |
Close
Hashes for llmprototyping-0.1.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f8cf9e189d9f6164b7af2e2bffe414f8d3cddcac467aaddfce3e47e1765156 |
|
MD5 | a424f91b7092a05d5a5f27e1e16d6d42 |
|
BLAKE2b-256 | f5a94521a0361941cf2636001f2ea20bfceec4933d96361e25de4758bd3a8f98 |