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.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for llama_index_llms_monsterapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f069ebd99f748ae579028c1026a12d053dbf3b1e85490a466ca2c61407e216c9
MD5 815fbe14c1d82532d59ef8f2d568567a
BLAKE2b-256 5e27cb3fd97fb692a33077883b4f3ded09a6eadef1df3548b95b7735b65be686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_monsterapi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c215b1a899f47a7789e610d8be39fa167b98be9af12401881017d64d713f3fd
MD5 21eb4ad74e17db973ee691ccdc5f34df
BLAKE2b-256 650a340727c07fbdbe6f4556d62698564e004748fdece5848fdfb04dcc257b55

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