Skip to main content

Loads a Langchain LLM by model name as a string.

Project description

Loads a Langchain LLM by model name as a string.

Usage

Load the LLM with the llmloader.load function. e.g.

import llmloader

llm = llmloader.load("gpt-4o")
result = llm.invoke("Write me a haiku about love")

llm = llmloader.load("claude-3-5-sonnet-20240620")
result = llm.invoke("Write me a haiku about love")

llm = llmloader.load("grok-2-latest")
result = llm.invoke("Write me a haiku about love")

llm = llmloader.load("meta-llama/Llama-3.3-70B-Instruct")
result = llm.invoke("Write me a haiku about love")

CLI

You can test out prompts and models on the command line.

llmloader "Write me a haiku about love" --model gpt-4o-mini
llmloader "Write me a haiku about love" --model gpt-4o
llmloader "Write me a haiku about love" --model claude-3-5-sonnet-20240620
llmloader "Write me a haiku about love" --model grok-2-latest
llmloader "Write me a haiku about love" --model meta-llama/Meta-Llama-3-8B-Instruct
llmloader "Write me a haiku about love" --model meta-llama/Llama-3.3-70B-Instruct
llmloader --help

Credit

Robert Turnbull (Melbourne Data Analytics Platform, University of Melbourne)

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

llmloader-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

llmloader-0.1.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file llmloader-0.1.2.tar.gz.

File metadata

  • Download URL: llmloader-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for llmloader-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9abece576f47e64eaafa07eaf695a2a201a95f9a34fd808d06aed1182b8fd9ca
MD5 36e1f1f5ca912873e2439d6429b7bf1f
BLAKE2b-256 5a6ee81e78e18acdee7b2c28f1b41e6f372478972074b6e6cdb680791301d6e9

See more details on using hashes here.

File details

Details for the file llmloader-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: llmloader-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for llmloader-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25ef176ab925fa43f1148e9291cc0cad9a605bc488457c48db1a5bc7cc992608
MD5 0e5ed60ccba8fc6d60f25e85d4a3dff8
BLAKE2b-256 9cc080ee4791084694b18d45c1aa9390ddbe80b021b6c08060518cd62a1f324a

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