Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgenius-client-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

langgenius_client-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file langgenius-client-0.1.1.tar.gz.

File metadata

  • Download URL: langgenius-client-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for langgenius-client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 00d85dcbcb6ff4c1dabed8a42374c049549d715869334181899c800490930d82
MD5 d7685a2339dcd9417db2fda88f582ad2
BLAKE2b-256 7804846fc9ed872db920ea66be1fecf5bd8bf2af632864971ea2e36e485ffbcc

See more details on using hashes here.

File details

Details for the file langgenius_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langgenius_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90aee53b1d144066eff8eb561b86ae773f4f938ec3cec1c6e73481e6b233672c
MD5 43420c82d3c15cdcb5df0a697881e0e2
BLAKE2b-256 81ea0b4dc0a9bc5792a40f02f09387e42d353b4ffafb00064cfe2cdbaed0e048

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