A package for interacting with the LangGenius Service-API
Project description
langgenius-client
A LangGenius App Service-API Client, using for build a webapp by request Service-API
Usage
api_key = "your_api_key"
# Initialize CompletionClient
completion_client = CompletionClient(api_key)
# Create Completion Message using CompletionClient
completion_response = completion_client.create_completion_message(inputs={}, query="Hello", response_mode="blocking", user="user_id")
print(completion_response)
# Initialize ChatClient
chat_client = ChatClient(api_key)
# Create Chat Message using ChatClient
chat_response = chat_client.create_chat_message(inputs={}, message="Hello", user="user_id", response_mode="streaming")
print(chat_response)
# Get Chat History using ChatClient
chat_history = chat_client.get_chat_history(user="user_id")
print(chat_history)
# Get Conversation List using ChatClient
conversations = chat_client.list_conversations(user="user_id")
print(conversations)
# Rename Conversation using ChatClient
rename_conversation_response = chat_client.rename_conversation(conversation_id="conversation_id", name="new_name", user="user_id")
print(rename_conversation_response)
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file langgenius-client-0.1.2.tar.gz
.
File metadata
- Download URL: langgenius-client-0.1.2.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ca0c91b6c259924ae347173692b201ef2b298f0eb2d9d4f26c4e4e22d4ff0e |
|
MD5 | 6752efe1c8aa68b65181926b377b2eaa |
|
BLAKE2b-256 | 3b6c847378eb6c0f2ac45dfc3871858153d162032a1e46d4c22cc0b7e07c318c |
File details
Details for the file langgenius_client-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: langgenius_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32605e59751bfd654b04d2d9f25741eda8c3837e3537ac803f95da6de18d4474 |
|
MD5 | 2acb0b558a9cb3443c4996e24398c7d3 |
|
BLAKE2b-256 | 50f4786810e8e3bffadd5ad9d772717047b34d771eff803f45e4a13a4c249e16 |