# 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)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/langgenius/langgenius-client",
"name": "langgenius-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "langgenius nlp ai language-processing",
"author": "LangGenius",
"author_email": "hello@langgenius.ai",
"download_url": "https://files.pythonhosted.org/packages/31/f4/487acf5080aaba95080e7d2100e85ff8c24bfdb0a928f39cc6d1320e2aa6/langgenius-client-0.1.3.tar.gz",
"platform": null,
"description": "# langgenius-client\nA LangGenius App Service-API Client, using for build a webapp by request Service-API\n\n## Usage\n\n```\napi_key = \"your_api_key\"\n\n# Initialize CompletionClient\ncompletion_client = CompletionClient(api_key)\n\n# Create Completion Message using CompletionClient\ncompletion_response = completion_client.create_completion_message(inputs={}, query=\"Hello\", response_mode=\"blocking\", user=\"user_id\")\nprint(completion_response)\n\n# Initialize ChatClient\nchat_client = ChatClient(api_key)\n\n# Create Chat Message using ChatClient\nchat_response = chat_client.create_chat_message(inputs={}, message=\"Hello\", user=\"user_id\", response_mode=\"streaming\")\nprint(chat_response)\n\n# Get Chat History using ChatClient\nchat_history = chat_client.get_chat_history(user=\"user_id\")\nprint(chat_history)\n\n# Get Conversation List using ChatClient\nconversations = chat_client.list_conversations(user=\"user_id\")\nprint(conversations)\n\n# Rename Conversation using ChatClient\nrename_conversation_response = chat_client.rename_conversation(conversation_id=\"conversation_id\", name=\"new_name\", user=\"user_id\")\nprint(rename_conversation_response)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A package for interacting with the LangGenius Service-API",
"version": "0.1.3",
"split_keywords": [
"langgenius",
"nlp",
"ai",
"language-processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54ae605dade2249ae80c7be7489b6864a66d7889256b4f5c7d31d636b56e5e2b",
"md5": "2275bf6f709bba857ef8d20c327ba747",
"sha256": "e8dbc5350a3554b3c9b5b565393b26cb7158dd02c4ec4e3af055c0aafc02249c"
},
"downloads": -1,
"filename": "langgenius_client-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2275bf6f709bba857ef8d20c327ba747",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3645,
"upload_time": "2023-04-13T08:19:56",
"upload_time_iso_8601": "2023-04-13T08:19:56.515255Z",
"url": "https://files.pythonhosted.org/packages/54/ae/605dade2249ae80c7be7489b6864a66d7889256b4f5c7d31d636b56e5e2b/langgenius_client-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31f4487acf5080aaba95080e7d2100e85ff8c24bfdb0a928f39cc6d1320e2aa6",
"md5": "018a375ae4d17083ac10f5779ee62eb8",
"sha256": "a69316572913320740f600db7dadd477e36db796cb940f1d76011fd5adf65ad5"
},
"downloads": -1,
"filename": "langgenius-client-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "018a375ae4d17083ac10f5779ee62eb8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3653,
"upload_time": "2023-04-13T08:19:59",
"upload_time_iso_8601": "2023-04-13T08:19:59.038813Z",
"url": "https://files.pythonhosted.org/packages/31/f4/487acf5080aaba95080e7d2100e85ff8c24bfdb0a928f39cc6d1320e2aa6/langgenius-client-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-13 08:19:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "langgenius",
"github_project": "langgenius-client",
"lcname": "langgenius-client"
}