claude2openai
Claude2OpenAI is a repository that provides a simple way to use the Slack bot Claude API in the same format as OpenAI's pip package. This makes it easy to integrate Claude into your Slack workspace and leverage its capabilities to enhance your team's productivity and communication. With Claude2OpenAI, you can quickly and easily convert your existing Slack bot to use the OpenAI API format, without having to rewrite your code from scratch. Whether you're a developer looking to streamline your workflow or a team leader looking to improve your team's communication, Claude2OpenAI is a powerful tool that can help you achieve your goals.
Installation
pip install --upgrade claude2openai
Install from source with python setup.py install
Usage
export SLACK_API_TOKEN=""
export BOT_ID=""
export CHANNEL_ID=""
Or set claude2openai to its value
import claude2openai
claude2openai.slack_api_token = "xxx"
claude2openai.bot_id = "xxx"
claude2openai.channel_id = "xxx"
Then
import claude2openai
# create a chat completion
chat_completion = claude2openai.ChatCompletion.create(model="claude", messages=[{"role": "user", "content": "Hello world"}])
# print the chat completion
print(chat_completion.choices[0].message.content)
Metadata
Release files for claude2openai 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude2openai-0.0.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude2openai-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / claude2openai-0.0.1.tar.gz
| Download URL | claude2openai-0.0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a384d850d97cd94129d00eb526b0e123a7d3d33fa3ca09a43f0fd7f514b8f63c
|
|
BLAKE2b-256 checksum How to use checksums |
9668b8a3bfdbb61e0d89a99e5e0c02013c09ccfa06fe5f1bf6ebfbccf11aa587
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / claude2openai-0.0.1-py3-none-any.whl
| Download URL | claude2openai-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f46d0a19c66b96c418ff2c7a63df839cf6ae36006c4229eca85eea1b2ff25d5
|
|
BLAKE2b-256 checksum How to use checksums |
e50b3385cdbb9e0c5b08073f42bbe9705ac20c0cf0d95adf252ce92ddb0964b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|