Skip to main content

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)

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.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgenius-client-0.1.3.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

Hashes for langgenius-client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a69316572913320740f600db7dadd477e36db796cb940f1d76011fd5adf65ad5
MD5 018a375ae4d17083ac10f5779ee62eb8
BLAKE2b-256 31f4487acf5080aaba95080e7d2100e85ff8c24bfdb0a928f39cc6d1320e2aa6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgenius_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e8dbc5350a3554b3c9b5b565393b26cb7158dd02c4ec4e3af055c0aafc02249c
MD5 2275bf6f709bba857ef8d20c327ba747
BLAKE2b-256 54ae605dade2249ae80c7be7489b6864a66d7889256b4f5c7d31d636b56e5e2b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page