A framework of LLM chat clients for mediq applications.
pip install med-chat
from med_chat import Message, ChatClient
chat_client = ChatClient.use("chatgpt")
response = chat_client.complete_chat(
messages = [
Message(role="user", content="What is the capital of the United States?"),
],
model="gpt-3.5-turbo"
)
print(response)Set environment variable OPENAI_API_KEY before calling ChatClient.use("chatgpt").
See more examples under tests directory.