Skip to main content

A package for using llm models with api

Project description

llmplus

Usage

from llmplus.ChatGot.api import API, Models
authorization_key = 'your authorization key from website headers'
api = API(authorization_key)
    
api.model = Models.GPT4()
answer = api.send('who is the manager of the real madrid?')

asnwer2  = api.send('who is the CEO?')

Models

Models.GPT4
Models.GPT3
Models.Claude2

Acsess to the chat history

API.json_data['messages']

Extracting code block set extract_code to the type of code block to return just the code block

asnwer2 = api.send('who is the CEO?', extract_code = "json")

LLM output: #===================== your output is here

{"a": "ssdgs"}

#=====================

LLM output with extract_code: #===================== {"a": "ssdgs"} #=====================

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

llmplus-0.0.9.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

llmplus-0.0.9-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file llmplus-0.0.9.tar.gz.

File metadata

  • Download URL: llmplus-0.0.9.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for llmplus-0.0.9.tar.gz
Algorithm Hash digest
SHA256 208664f7ea115bd8180734006c5693cd4165e160987251ca261b315f4c67e0fe
MD5 7e4219872c144d181ece340c6f77fb5d
BLAKE2b-256 bddf36907282ad9a86d7853c75f88d2d129ae55354053fc8dc4f5f25bd25c350

See more details on using hashes here.

File details

Details for the file llmplus-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: llmplus-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for llmplus-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 478908f8e19e24bfd6c002d21be26b4fc39b9a37bc3a30b20e11b478d43c0820
MD5 790b5e9d3c967cf6d4f6f98cf4bd220c
BLAKE2b-256 379ba118341144edbd864775b1d7b2028751d195a1c6286a6788a64ef9088b28

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