Utilities for managing multi-shot conversations and structured data handling in LLM applications
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
mdi-llmkit
Utilities for managing LLM chat conversations and structured JSON responses with OpenAI's Responses API.
Installation
pip install mdi-llmkit
Quick Start
gpt_submit
from openai import OpenAI
from mdi_llmkit.gpt_api.functions import gpt_submit
client = OpenAI()
reply = gpt_submit(
messages=[{"role": "user", "content": "Say hello."}],
openai_client=client,
)
print(reply)
GptConversation
from openai import OpenAI
from mdi_llmkit.gpt_api.gpt_conversation import GptConversation
client = OpenAI()
conversation = GptConversation(openai_client=client)
reply = conversation.submit_user_message("Give me three project name ideas.")
print(reply)
JSON Response Mode
from openai import OpenAI
from mdi_llmkit.gpt_api.functions import gpt_submit
client = OpenAI()
result = gpt_submit(
messages=[{"role": "user", "content": "Return JSON with keys a and b."}],
openai_client=client,
json_response=True,
)
print(type(result)) # dict or list
print(result)
Notes
- Package name for
pip installismdi-llmkit. - Python import package is
mdi_llmkit. gpt_submitsupports optional warning reporting viawarning_callback.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdi_llmkit-0.1.0.tar.gz.
File metadata
- Download URL: mdi_llmkit-0.1.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e1ce7b73308ac3d0fe9351ad58f543b651eea34f71ab9adab71a5bee923c969
|
|
| MD5 |
387e4c8e9de45584ad252a1477bffc50
|
|
| BLAKE2b-256 |
8a39c570d128318140c528f2970700425677e26f0e84771533993bf13b2222ed
|
File details
Details for the file mdi_llmkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mdi_llmkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
775281c692feb8d11531c2b385e78256b3556b8760cd9921ba59a33586924542
|
|
| MD5 |
edfe3f506207de56cb4da88c422e3992
|
|
| BLAKE2b-256 |
7504a769425f3cf8f536b3fe52ca3605d4bc982f508414240ad25a798c7b8209
|