Skip to main content

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

  1. 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?")
        ```
    
  2. 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

llama_index_llms_monsterapi-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_llms_monsterapi-0.1.3.tar.gz.

File metadata

File hashes

Hashes for llama_index_llms_monsterapi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f09175bf3d2159988af42c94473b5bf8f8f7028d743ad9b6dd415978590048f6
MD5 c81be8a46c541158897aed4be162ca1f
BLAKE2b-256 71d7d3ccb1bbd319259f63abbf1341dbe22f00853b4b77a7f309c015a4e753ad

See more details on using hashes here.

File details

Details for the file llama_index_llms_monsterapi-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_monsterapi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b0cbe6a600b30104f2234da73fa139e18de83820d1a7fc59b4a810fde633494
MD5 ab38f8a647325921060ff06591d3a917
BLAKE2b-256 3aa7cb4a1fdbc1865ab9984f54d7bf39abbea522b1f538a547a3aa724877b78d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page