VersaCoreLLMChatAPI
A Python library for interacting with VersaCore LLM Chat API.
Installation
pip install versacorellmchatapi
Usage
if __name__ == "__main__":
def handle_chunk(chunk, end=False):
# Custom handling of each chunk
if chunk:
print(chunk, end='', flush=True)
if end:
print() # Print a newline at the end of the stream
lm_studio_llm_api = VersaCoreLLMChatAPI("lmstudio")
ollama_llm_api = VersaCoreLLMChatAPI("ollama")
messages = [
{ "role": "system", "content": "You are a useful chatbot." },
{ "role": "user", "content": "write a short story of 2000 words about a funny corgi." }
]
lm_studio_response = lm_studio_llm_api.chat_completions(
messages,
model="lmstudio-community/Mistral-7B-Instruct-v0.3-GGUF/Mistral-7B-Instruct-v0.3-Q5_K_M.gguf",
temperature=0.7,
max_tokens=-1,
stream=True,
callback=handle_chunk
)
ollama_response = ollama_llm_api.chat_completions(
messages,
model="mistral",
stream=True,
callback=handle_chunk # Use the custom callback to handle streaming chunks
)
Metadata
Release files for versacorellmchatapi 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| versacorellmchatapi-0.1.9.tar.gz | 3.7 kB | Without provenance | Details for versacorellmchatapi-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| versacorellmchatapi-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for versacorellmchatapi-0.1.9-py3-none-any.whl |
Total release size: 8.7 kB
Release files / versacorellmchatapi-0.1.9.tar.gz
| Download URL | versacorellmchatapi-0.1.9.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66407caf2c7f31040ef61ff147596b87c575c4f28bd5d4b56b0ab3ee5c49ceb9
|
|
BLAKE2b-256 checksum How to use checksums |
08c43055756465ec9a6a31287bd5d3bc3ca02cd6daefa459840fbcbe17482ab2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / versacorellmchatapi-0.1.9-py3-none-any.whl
| Download URL | versacorellmchatapi-0.1.9-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d0a78f6f0d3b583b26a2d7a3e936d82af866b5bf6b867526780ebcf49ab7e86
|
|
BLAKE2b-256 checksum How to use checksums |
d6ed6faff111bf9af0b36bf1e8863c74c6916f13667ca889c48f804f286e006b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for versacorellmchatapi 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.