osmosis-ai 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl
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.
Potentially problematic release.
This version of osmosis-ai might be problematic. Click here for more details.
- osmosis_ai/adapters/__init__.py +1 -1
- osmosis_ai/adapters/anthropic.py +1 -1
- osmosis_ai/adapters/langchain.py +1 -1
- osmosis_ai/adapters/langchain_anthropic.py +1 -1
- osmosis_ai/adapters/langchain_openai.py +1 -1
- osmosis_ai/adapters/openai.py +1 -1
- osmosis_ai/consts.py +1 -1
- osmosis_ai/logger.py +1 -1
- osmosis_ai/utils.py +3 -3
- {osmosis_ai-0.1.5.dist-info → osmosis_ai-0.1.6.dist-info}/METADATA +9 -9
- osmosis_ai-0.1.6.dist-info/RECORD +15 -0
- {osmosis_ai-0.1.5.dist-info → osmosis_ai-0.1.6.dist-info}/WHEEL +1 -1
- osmosis_ai-0.1.5.dist-info/RECORD +0 -15
- {osmosis_ai-0.1.5.dist-info → osmosis_ai-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {osmosis_ai-0.1.5.dist-info → osmosis_ai-0.1.6.dist-info}/top_level.txt +0 -0
osmosis_ai/adapters/__init__.py
CHANGED
osmosis_ai/adapters/anthropic.py
CHANGED
osmosis_ai/adapters/langchain.py
CHANGED
osmosis_ai/adapters/openai.py
CHANGED
osmosis_ai/consts.py
CHANGED
|
@@ -2,7 +2,7 @@ from enum import Enum
|
|
|
2
2
|
|
|
3
3
|
# Extract package metadata
|
|
4
4
|
package_name = "osmosis-ai"
|
|
5
|
-
package_version = "0.1.
|
|
5
|
+
package_version = "0.1.6"
|
|
6
6
|
|
|
7
7
|
indent = 2 # Number of spaces to use for indentation in pretty print
|
|
8
8
|
osmosis_api_url = "https://ftgrv77m9f.execute-api.us-west-2.amazonaws.com/prod"
|
osmosis_ai/logger.py
CHANGED
osmosis_ai/utils.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Utility functions for
|
|
2
|
+
Utility functions for osmosisadapters
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import json
|
|
@@ -18,7 +18,7 @@ _initialized = False
|
|
|
18
18
|
|
|
19
19
|
def init(api_key: str) -> None:
|
|
20
20
|
"""
|
|
21
|
-
Initialize
|
|
21
|
+
Initialize osmosiswith the OSMOSIS API key.
|
|
22
22
|
|
|
23
23
|
Args:
|
|
24
24
|
api_key: The OSMOSIS API key for logging LLM usage
|
|
@@ -48,7 +48,7 @@ def send_to_osmosis(query: Dict[str, Any], response: Dict[str, Any], status: int
|
|
|
48
48
|
return
|
|
49
49
|
|
|
50
50
|
if not _initialized:
|
|
51
|
-
logger.warning("
|
|
51
|
+
logger.warning("osmosisnot initialized. Call osmosis_ai.init(api_key) first.")
|
|
52
52
|
return
|
|
53
53
|
|
|
54
54
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: osmosis-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: Monkey patches LLM client libraries to print all prompts and responses
|
|
5
5
|
Author-email: Gulp AI <jake@gulp.ai>
|
|
6
6
|
License: MIT License
|
|
@@ -24,8 +24,8 @@ License: MIT License
|
|
|
24
24
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
26
|
SOFTWARE.
|
|
27
|
-
Project-URL: Homepage, https://github.com/Gulp-AI/osmosis-
|
|
28
|
-
Project-URL: Issues, https://github.com/Gulp-AI/osmosis-
|
|
27
|
+
Project-URL: Homepage, https://github.com/Gulp-AI/osmosis-sdk-python
|
|
28
|
+
Project-URL: Issues, https://github.com/Gulp-AI/osmosis-sdk-python/issues
|
|
29
29
|
Classifier: Programming Language :: Python :: 3
|
|
30
30
|
Classifier: License :: OSI Approved :: MIT License
|
|
31
31
|
Classifier: Operating System :: OS Independent
|
|
@@ -57,11 +57,11 @@ Requires-Dist: langchain-openai>=0.0.200; extra == "all"
|
|
|
57
57
|
Requires-Dist: langchain-anthropic>=0.0.200; extra == "all"
|
|
58
58
|
Dynamic: license-file
|
|
59
59
|
|
|
60
|
-
[](https://github.com/Gulp-AI/osmosis-sdk-python/actions/workflows/test.yml)
|
|
61
61
|
|
|
62
|
-
# Osmosis
|
|
62
|
+
# Osmosis
|
|
63
63
|
|
|
64
|
-
A Python library that monkey patches LLM client libraries to send all prompts and responses to the
|
|
64
|
+
A Python library that monkey patches LLM client libraries to send all prompts and responses to the Osmosis API for logging and monitoring.
|
|
65
65
|
|
|
66
66
|
## Supported Libraries
|
|
67
67
|
|
|
@@ -93,7 +93,7 @@ pip install "osmosis-ai[all]"
|
|
|
93
93
|
Or install from source:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
git clone https://github.com/your-username/osmosis-
|
|
96
|
+
git clone https://github.com/your-username/osmosis-sdk-python.git
|
|
97
97
|
cd osmosis-ai
|
|
98
98
|
pip install -e .
|
|
99
99
|
```
|
|
@@ -106,7 +106,7 @@ pip install -r requirements.txt
|
|
|
106
106
|
|
|
107
107
|
## Environment Setup
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
osmosisrequires a OSMOSIS API key to log LLM usage. Create a `.env` file in your project directory:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
112
|
# Copy the sample .env file
|
|
@@ -128,7 +128,7 @@ OPENAI_API_KEY=your_openai_key_here
|
|
|
128
128
|
|
|
129
129
|
## Usage
|
|
130
130
|
|
|
131
|
-
First, import and initialize
|
|
131
|
+
First, import and initialize osmosiswith your OSMOSIS API key:
|
|
132
132
|
|
|
133
133
|
```python
|
|
134
134
|
import os
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
osmosis_ai/__init__.py,sha256=nQJwkT7efmsSQ0ydygcH1OUW8y2rKxHCnwKD-Br51Co,4266
|
|
2
|
+
osmosis_ai/consts.py,sha256=EqrQmFe6kXMHgK5J2xdtzUFnuRVaV3KDDsbQATQphwo,441
|
|
3
|
+
osmosis_ai/logger.py,sha256=eG-GJoUo7bcrFkLOS0HGzCSbshaZRoowjSI0ZsUZH1U,2160
|
|
4
|
+
osmosis_ai/utils.py,sha256=_CLtNAxli8bTzIzDY86MWefpJpFoAdta9RHC2DnEpP0,2470
|
|
5
|
+
osmosis_ai/adapters/__init__.py,sha256=IOaShk3HYVdKYRd6aPLu1Shvt_LeUjYaCrtOE3BIrJw,262
|
|
6
|
+
osmosis_ai/adapters/anthropic.py,sha256=GzTw03L9zth7GjCKEbNgEgDQQApwohmm6MpWbsa52CE,21796
|
|
7
|
+
osmosis_ai/adapters/langchain.py,sha256=s_T7LM-o8VR3UMGeudj-XSjC_jDQvAHHAWdgTUJcOKA,26397
|
|
8
|
+
osmosis_ai/adapters/langchain_anthropic.py,sha256=VME8PJMjjtikL00JiFaH7VWtySAWJ9eYez2gFyhGN8U,13350
|
|
9
|
+
osmosis_ai/adapters/langchain_openai.py,sha256=1Jo3X5Yv14SztvidLZM4usdnF8lcjxhVhECO85hgWl4,22908
|
|
10
|
+
osmosis_ai/adapters/openai.py,sha256=8pVtVkD5rUGI5tpNmGIYVBTOyPmheQTknmGHNDjrYd8,38620
|
|
11
|
+
osmosis_ai-0.1.6.dist-info/licenses/LICENSE,sha256=WLvxAm2-fPuT8qECE6ejD8ezG9btIanJl7zysXvtQgM,1064
|
|
12
|
+
osmosis_ai-0.1.6.dist-info/METADATA,sha256=Yl84ihmD7UbC7lS0atAC7lIriauKyXXKq0DNZ0oxVK8,9255
|
|
13
|
+
osmosis_ai-0.1.6.dist-info/WHEEL,sha256=DK49LOLCYiurdXXOXwGJm6U4DkHkg4lcxjhqwRa0CP4,91
|
|
14
|
+
osmosis_ai-0.1.6.dist-info/top_level.txt,sha256=UPNRTKIBSrxsJVNxwXnLCqSoBS4bAiL_3jMtjvf5zEY,11
|
|
15
|
+
osmosis_ai-0.1.6.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
osmosis_ai/__init__.py,sha256=nQJwkT7efmsSQ0ydygcH1OUW8y2rKxHCnwKD-Br51Co,4266
|
|
2
|
-
osmosis_ai/consts.py,sha256=X47sKF5fDss23UIJJwwlIsP-Py78afwiqOcxDJPKiYQ,441
|
|
3
|
-
osmosis_ai/logger.py,sha256=bUok07WG2vaY0lDdEnn_JM_rI_UaRu3PcidVKaTZpPA,2165
|
|
4
|
-
osmosis_ai/utils.py,sha256=A0A2kcPc2os7QRLMHFyXjdhOzszRsAoHhwqWhtpETFY,2488
|
|
5
|
-
osmosis_ai/adapters/__init__.py,sha256=Lq9r0h-jwKoZy2iabwUxpbwlf6ybobRRpbGi6NfeX7U,267
|
|
6
|
-
osmosis_ai/adapters/anthropic.py,sha256=ans7rYdtlgXtjcbGNyuLIST18gQKfU1l4kghD9E3ugM,21801
|
|
7
|
-
osmosis_ai/adapters/langchain.py,sha256=0AF6S7he-XBfjaYq2J8e-Zn_X2wT0P2YsoEi8pmyqKU,26402
|
|
8
|
-
osmosis_ai/adapters/langchain_anthropic.py,sha256=IQ3uhn-3mgvK3ln4kqR_3OyPaI_10X6WFRgoiebuN_4,13355
|
|
9
|
-
osmosis_ai/adapters/langchain_openai.py,sha256=8VctxATCHi6M2jy3JtLOWez9jww1bMXg4t8A1c78oTk,22913
|
|
10
|
-
osmosis_ai/adapters/openai.py,sha256=E036slghKoe80futj8wsLY2exDjbwgtTxpnR3UCgfRY,38625
|
|
11
|
-
osmosis_ai-0.1.5.dist-info/licenses/LICENSE,sha256=WLvxAm2-fPuT8qECE6ejD8ezG9btIanJl7zysXvtQgM,1064
|
|
12
|
-
osmosis_ai-0.1.5.dist-info/METADATA,sha256=rd9ObQ2l-RgCU_hnQhiFdRN_Ec2l36BF19aF706Roh4,9232
|
|
13
|
-
osmosis_ai-0.1.5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
14
|
-
osmosis_ai-0.1.5.dist-info/top_level.txt,sha256=UPNRTKIBSrxsJVNxwXnLCqSoBS4bAiL_3jMtjvf5zEY,11
|
|
15
|
-
osmosis_ai-0.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|