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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_monsterapi-0.5.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_llms_monsterapi-0.5.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_monsterapi-0.5.1.tar.gz
Algorithm Hash digest
SHA256 4400ce1fc0392828e17afc7c207e3f553b013700504c2f4ad6036d1e1be16dae
MD5 b25cae6a38e42ad660c71ab5a14f4e1d
BLAKE2b-256 c1a148d48813a975697734d1541ff41ed6147504c6ae63df2e99a1d6c8b4c5d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_llms_monsterapi-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_monsterapi-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76926f5c189922b2bc7cbdfa656a1ff45998de2f49e4094378581604d307bdda
MD5 921f0ba57e6b3d84c5cdc097ca9c00bf
BLAKE2b-256 afe736f36689c33551d14b42ae1d0e721d48055be70c08c18a0d1c90333337e9

See more details on using hashes here.

Supported by

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