ojin-client 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ojin_client-0.1.4/PKG-INFO +76 -0
- ojin_client-0.1.4/README.md +51 -0
- ojin_client-0.1.4/ojin/__init__.py +0 -0
- ojin_client-0.1.4/ojin/cacert.pem +3480 -0
- ojin_client-0.1.4/ojin/entities/interaction_messages.py +435 -0
- ojin_client-0.1.4/ojin/entities/session_messages.py +85 -0
- ojin_client-0.1.4/ojin/ojin_persona_client.py +341 -0
- ojin_client-0.1.4/ojin/ojin_persona_messages.py +228 -0
- ojin_client-0.1.4/ojin_client.egg-info/PKG-INFO +76 -0
- ojin_client-0.1.4/ojin_client.egg-info/SOURCES.txt +13 -0
- ojin_client-0.1.4/ojin_client.egg-info/dependency_links.txt +1 -0
- ojin_client-0.1.4/ojin_client.egg-info/requires.txt +15 -0
- ojin_client-0.1.4/ojin_client.egg-info/top_level.txt +1 -0
- ojin_client-0.1.4/pyproject.toml +81 -0
- ojin_client-0.1.4/setup.cfg +4 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ojin-client
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Ojin platform services
|
|
5
|
+
Author: Journee
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/journee-live/ojin
|
|
8
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: websockets>=14.0
|
|
12
|
+
Requires-Dist: async-lru>=2.0.5
|
|
13
|
+
Requires-Dist: pyjwt>=2.10.1
|
|
14
|
+
Requires-Dist: pydantic-settings>=2.8.1
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest>=8.3.5; extra == "dev"
|
|
17
|
+
Requires-Dist: pytest-asyncio>=0.26.0; extra == "dev"
|
|
18
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pytest-httpx>=0.35.0; extra == "dev"
|
|
20
|
+
Requires-Dist: ruff>=0.11.4; extra == "dev"
|
|
21
|
+
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
22
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
23
|
+
Requires-Dist: fastapi>=0.115.13; extra == "dev"
|
|
24
|
+
Requires-Dist: uvicorn>=0.34.3; extra == "dev"
|
|
25
|
+
|
|
26
|
+
# Ojin Persona Client
|
|
27
|
+
|
|
28
|
+
A WebSocket client for Ojin Avatar model that handles communication with Inference Server. It is used for example by Ojin Persona Service for Pipecat https://github.com/pipecat-ai/pipecat
|
|
29
|
+
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
- Python 3.10+
|
|
33
|
+
- pip or uv package manager
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install ojin-client
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Usage
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from ojin.ojin_avatar_client import OjinAvatarClient
|
|
45
|
+
|
|
46
|
+
avatar = OjinAvatarClient(
|
|
47
|
+
ws_url="THE_OJIN_URL",
|
|
48
|
+
api_key="YOUR_OJIN_API_KEY",
|
|
49
|
+
avatar_config_id="YOUR_OJIN_CONFIGURATION"M
|
|
50
|
+
)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### API methods
|
|
54
|
+
|
|
55
|
+
- connect: Establishes the websocket connection with the ojin inference server
|
|
56
|
+
- send_message: Sends messages to the ojin inference server
|
|
57
|
+
- receive_message: Receives messages from the ojin inference server
|
|
58
|
+
- close: closes the connection with ojin inference server
|
|
59
|
+
|
|
60
|
+
### Messages
|
|
61
|
+
|
|
62
|
+
- OjinAvatarInteractionReadyMessage: Message indicating that an interaction is ready to begin
|
|
63
|
+
|
|
64
|
+
- OjinAvatarSessionReadyMessage: Message to start a new interaction with an Ojin Avatar
|
|
65
|
+
|
|
66
|
+
- OjinAvatarCancelInteractionMessage: Message to cancel an interaction
|
|
67
|
+
|
|
68
|
+
- OjinAvatarInteractionInputMessage: Contains the audio data as bytes and a flag indicating if this is the last input
|
|
69
|
+
|
|
70
|
+
### Responses
|
|
71
|
+
|
|
72
|
+
- StartInteractionResponseMessage: Response message for a successful interaction start
|
|
73
|
+
|
|
74
|
+
- OjinAvatarInteractionResponseMessage: Response message containing video data from the avatar
|
|
75
|
+
|
|
76
|
+
- ErrorResponseMessage: Response message informing the client there was an error
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Ojin Persona Client
|
|
2
|
+
|
|
3
|
+
A WebSocket client for Ojin Avatar model that handles communication with Inference Server. It is used for example by Ojin Persona Service for Pipecat https://github.com/pipecat-ai/pipecat
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Python 3.10+
|
|
8
|
+
- pip or uv package manager
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install ojin-client
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Usage
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from ojin.ojin_avatar_client import OjinAvatarClient
|
|
20
|
+
|
|
21
|
+
avatar = OjinAvatarClient(
|
|
22
|
+
ws_url="THE_OJIN_URL",
|
|
23
|
+
api_key="YOUR_OJIN_API_KEY",
|
|
24
|
+
avatar_config_id="YOUR_OJIN_CONFIGURATION"M
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### API methods
|
|
29
|
+
|
|
30
|
+
- connect: Establishes the websocket connection with the ojin inference server
|
|
31
|
+
- send_message: Sends messages to the ojin inference server
|
|
32
|
+
- receive_message: Receives messages from the ojin inference server
|
|
33
|
+
- close: closes the connection with ojin inference server
|
|
34
|
+
|
|
35
|
+
### Messages
|
|
36
|
+
|
|
37
|
+
- OjinAvatarInteractionReadyMessage: Message indicating that an interaction is ready to begin
|
|
38
|
+
|
|
39
|
+
- OjinAvatarSessionReadyMessage: Message to start a new interaction with an Ojin Avatar
|
|
40
|
+
|
|
41
|
+
- OjinAvatarCancelInteractionMessage: Message to cancel an interaction
|
|
42
|
+
|
|
43
|
+
- OjinAvatarInteractionInputMessage: Contains the audio data as bytes and a flag indicating if this is the last input
|
|
44
|
+
|
|
45
|
+
### Responses
|
|
46
|
+
|
|
47
|
+
- StartInteractionResponseMessage: Response message for a successful interaction start
|
|
48
|
+
|
|
49
|
+
- OjinAvatarInteractionResponseMessage: Response message containing video data from the avatar
|
|
50
|
+
|
|
51
|
+
- ErrorResponseMessage: Response message informing the client there was an error
|
|
File without changes
|