llama-index llms monsterapi integration
Project description
LlamaIndex Llms Integration: Monsterapi
MonsterAPI LLM.
Monster Deploy enables you to host any vLLM supported large language model (LLM) like Tinyllama, Mixtral, Phi-2 etc as a rest API endpoint on MonsterAPI's cost optimised GPU cloud.
With MonsterAPI's integration in Llama index, you can use your deployed LLM API endpoints to create RAG system or RAG bot for use cases such as: - Answering questions on your documents - Improving the content of your documents - Finding context of importance in your documents
Once deployment is launched use the base_url and api_auth_token once deployment is live and use them below.
Note: When using LLama index to access Monster Deploy LLMs, you need to create a prompt with required template and send compiled prompt as input.
See LLama Index Prompt Template Usage example
section for more details.
see (https://developer.monsterapi.ai/docs/monster-deploy-beta) for more details
Once deployment is launched use the base_url and api_auth_token once deployment is live and use them below.
Note: When using LLama index to access Monster Deploy LLMs, you need to create a prompt with reqhired template and send compiled prompt as input. see section LLama Index Prompt Template Usage example
for more details.
Examples:
pip install llama-index-llms-monsterapi
-
MonsterAPI Private LLM Deployment use case
from llama_index.llms.monsterapi import MonsterLLM llm = MonsterLLM( model = "<Replace with basemodel used to deploy>", api_base="https://ecc7deb6-26e0-419b-a7f2-0deb934af29a.monsterapi.ai", api_key="a0f8a6ba-c32f-4407-af0c-169f1915490c", temperature=0.75, ) response = llm.complete("What is the capital of France?") ```
-
Monster API General Available LLMs
from llama_index.llms.monsterapi import MonsterLLM llm = MonsterLLM(model="microsoft/Phi-3-mini-4k-instruct") response = llm.complete("What is the capital of France?") print(str(response)) ```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_llms_monsterapi-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_monsterapi-0.3.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3b207d0d8bfd1f29fc666bb223f835150a3d86e8e0de95c06a22b3a93b498a8 |
|
MD5 | 9fa4e5770f5d0198f0e9c6fc779eb4d4 |
|
BLAKE2b-256 | 0c163ec6adfbaeaf4d3d4f18f36000e270752eaf5ee4087a38ef02a961f41c48 |
File details
Details for the file llama_index_llms_monsterapi-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_monsterapi-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f923351a7ac6d303e142f2ac71dccf42a7406fccdd491833099a0f219dbe9cc |
|
MD5 | 5fd45ebe32a48a9b6e6de24c93deb077 |
|
BLAKE2b-256 | 543e49fe8c3843dca1b4efbe69aebc826408a754e3e42608fbd693a632dd11d3 |