llumo 0.2.3__tar.gz → 0.2.5__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.
- llumo-0.2.5/PKG-INFO +52 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/functionCalling.py +27 -24
- {llumo-0.2.3 → llumo-0.2.5}/llumo/helpingFuntions.py +0 -4
- llumo-0.2.5/llumo.egg-info/PKG-INFO +52 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo.egg-info/requires.txt +0 -4
- llumo-0.2.5/setup.py +80 -0
- llumo-0.2.3/PKG-INFO +0 -27
- llumo-0.2.3/llumo.egg-info/PKG-INFO +0 -27
- llumo-0.2.3/setup.py +0 -80
- {llumo-0.2.3 → llumo-0.2.5}/LICENSE +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/MANIFEST.in +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/README.md +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/__init__.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/client.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/exceptions.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/execution.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/models.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo/sockets.py +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo.egg-info/SOURCES.txt +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo.egg-info/dependency_links.txt +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/llumo.egg-info/top_level.txt +0 -0
- {llumo-0.2.3 → llumo-0.2.5}/setup.cfg +0 -0
llumo-0.2.5/PKG-INFO
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: llumo
|
3
|
+
Version: 0.2.5
|
4
|
+
Summary: Python SDK for interacting with the Llumo ai API.
|
5
|
+
Home-page: https://www.llumo.ai/
|
6
|
+
Author: Llumo
|
7
|
+
Author-email: product@llumo.ai
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
9
|
+
Classifier: Intended Audience :: Developers
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Classifier: Programming Language :: Python :: 3.7
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Requires-Python: >=3.7
|
18
|
+
Description-Content-Type: text/markdown
|
19
|
+
License-File: LICENSE
|
20
|
+
Requires-Dist: requests>=2.0.0
|
21
|
+
Requires-Dist: python-socketio
|
22
|
+
Requires-Dist: python-dotenv
|
23
|
+
Requires-Dist: openai==1.75.0
|
24
|
+
Requires-Dist: google-generativeai==0.8.5
|
25
|
+
Dynamic: author
|
26
|
+
Dynamic: author-email
|
27
|
+
Dynamic: classifier
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: home-page
|
31
|
+
Dynamic: license-file
|
32
|
+
Dynamic: requires-dist
|
33
|
+
Dynamic: requires-python
|
34
|
+
Dynamic: summary
|
35
|
+
|
36
|
+
# LLUMO SDK
|
37
|
+
|
38
|
+
A lightweight Python SDK to interact with the LLUMO API for evaluating LLM responses using analytics like Confidence, Clarity, Context, etc.
|
39
|
+
|
40
|
+
## 🔧 Features
|
41
|
+
|
42
|
+
- API wrapper for LLUMO's analytics endpoints
|
43
|
+
- Supports multiple analytics types
|
44
|
+
|
45
|
+
## 📦 Installation
|
46
|
+
|
47
|
+
Clone and install locally:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
git clone https://github.com/yourusername/llumo-sdk.git
|
51
|
+
cd llumo-sdk
|
52
|
+
pip install .
|
@@ -2,19 +2,19 @@ import os
|
|
2
2
|
import json
|
3
3
|
import pandas as pd
|
4
4
|
from typing import Callable, List, Dict
|
5
|
-
from dotenv import load_dotenv
|
6
5
|
import google.generativeai as genai
|
7
6
|
from google.generativeai.types import FunctionDeclaration, Tool
|
8
7
|
from openai import OpenAI
|
9
8
|
from .exceptions import *
|
10
|
-
|
11
|
-
load_dotenv()
|
9
|
+
|
12
10
|
# openai_api = os.getenv("OPENAI_API_KEY")
|
13
11
|
# google_api_key = os.getenv("GOOGLE_API_KEY")
|
14
12
|
|
15
13
|
|
16
14
|
class LlumoAgent:
|
17
|
-
def __init__(
|
15
|
+
def __init__(
|
16
|
+
self, name: str, description: str, parameters: Dict, function: Callable
|
17
|
+
):
|
18
18
|
self.name = name
|
19
19
|
self.description = description
|
20
20
|
self.parameters = parameters
|
@@ -30,8 +30,8 @@ class LlumoAgent:
|
|
30
30
|
parameters={
|
31
31
|
"type": "object",
|
32
32
|
"properties": self.parameters,
|
33
|
-
"required": list(self.parameters.keys())
|
34
|
-
}
|
33
|
+
"required": list(self.parameters.keys()),
|
34
|
+
},
|
35
35
|
)
|
36
36
|
|
37
37
|
def createOpenaiTool(self):
|
@@ -44,25 +44,28 @@ class LlumoAgent:
|
|
44
44
|
"type": "object",
|
45
45
|
"properties": self.parameters,
|
46
46
|
"required": list(self.parameters.keys()),
|
47
|
-
}
|
48
|
-
}
|
47
|
+
},
|
48
|
+
},
|
49
49
|
}
|
50
50
|
|
51
51
|
|
52
52
|
class LlumoAgentExecutor:
|
53
53
|
|
54
54
|
@staticmethod
|
55
|
-
def run(df: pd.DataFrame, agents: List[LlumoAgent], model: str,model_api_key
|
55
|
+
def run(df: pd.DataFrame, agents: List[LlumoAgent], model: str, model_api_key=None):
|
56
56
|
if model.lower() == "google":
|
57
|
-
return LlumoAgentExecutor.runWithGoogle(
|
57
|
+
return LlumoAgentExecutor.runWithGoogle(
|
58
|
+
df, agents, model_api_key=model_api_key
|
59
|
+
)
|
58
60
|
elif model.lower() == "openai":
|
59
|
-
return LlumoAgentExecutor.runWithOpenAI(
|
61
|
+
return LlumoAgentExecutor.runWithOpenAI(
|
62
|
+
df, agents, model_api_key=model_api_key
|
63
|
+
)
|
60
64
|
else:
|
61
65
|
raise ValueError(f"Unsupported model: {model}. Use 'google' or 'openai'.")
|
62
66
|
|
63
|
-
|
64
67
|
@staticmethod
|
65
|
-
def runWithGoogle(df: pd.DataFrame, agents: List[LlumoAgent],model_api_key
|
68
|
+
def runWithGoogle(df: pd.DataFrame, agents: List[LlumoAgent], model_api_key=None):
|
66
69
|
try:
|
67
70
|
genai.configure(api_key=model_api_key)
|
68
71
|
tool_defs = []
|
@@ -94,7 +97,7 @@ class LlumoAgentExecutor:
|
|
94
97
|
follow_up_msg = {
|
95
98
|
"function_response": {
|
96
99
|
"name": func_call.name,
|
97
|
-
"response": result
|
100
|
+
"response": result,
|
98
101
|
}
|
99
102
|
}
|
100
103
|
|
@@ -119,7 +122,7 @@ class LlumoAgentExecutor:
|
|
119
122
|
raise RuntimeError(f"Error in runWithGoogle: {e}")
|
120
123
|
|
121
124
|
@staticmethod
|
122
|
-
def runWithOpenAI(df: pd.DataFrame, agents: List[LlumoAgent],model_api_key
|
125
|
+
def runWithOpenAI(df: pd.DataFrame, agents: List[LlumoAgent], model_api_key=None):
|
123
126
|
try:
|
124
127
|
client = OpenAI(api_key=model_api_key)
|
125
128
|
all_tools = [agent.createOpenaiTool() for agent in agents]
|
@@ -137,7 +140,7 @@ class LlumoAgentExecutor:
|
|
137
140
|
model="gpt-4",
|
138
141
|
messages=messages,
|
139
142
|
tools=all_tools,
|
140
|
-
tool_choice="auto"
|
143
|
+
tool_choice="auto",
|
141
144
|
)
|
142
145
|
|
143
146
|
first_message = initial_response.choices[0].message
|
@@ -157,15 +160,16 @@ class LlumoAgentExecutor:
|
|
157
160
|
agent = agent_lookup[tool_name]
|
158
161
|
tool_result = agent.run(**args)
|
159
162
|
|
160
|
-
messages.append(
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
163
|
+
messages.append(
|
164
|
+
{
|
165
|
+
"role": "tool",
|
166
|
+
"tool_call_id": call.id,
|
167
|
+
"content": str(tool_result),
|
168
|
+
}
|
169
|
+
)
|
165
170
|
|
166
171
|
final_response = client.chat.completions.create(
|
167
|
-
model="gpt-4",
|
168
|
-
messages=messages
|
172
|
+
model="gpt-4", messages=messages
|
169
173
|
)
|
170
174
|
final_output = final_response.choices[0].message.content
|
171
175
|
messages.append({"role": "assistant", "content": final_output})
|
@@ -187,4 +191,3 @@ class LlumoAgentExecutor:
|
|
187
191
|
|
188
192
|
except Exception as e:
|
189
193
|
raise RuntimeError(f"Error in runWithOpenAI: {e}")
|
190
|
-
|
@@ -0,0 +1,52 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: llumo
|
3
|
+
Version: 0.2.5
|
4
|
+
Summary: Python SDK for interacting with the Llumo ai API.
|
5
|
+
Home-page: https://www.llumo.ai/
|
6
|
+
Author: Llumo
|
7
|
+
Author-email: product@llumo.ai
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
9
|
+
Classifier: Intended Audience :: Developers
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Classifier: Programming Language :: Python :: 3.7
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Requires-Python: >=3.7
|
18
|
+
Description-Content-Type: text/markdown
|
19
|
+
License-File: LICENSE
|
20
|
+
Requires-Dist: requests>=2.0.0
|
21
|
+
Requires-Dist: python-socketio
|
22
|
+
Requires-Dist: python-dotenv
|
23
|
+
Requires-Dist: openai==1.75.0
|
24
|
+
Requires-Dist: google-generativeai==0.8.5
|
25
|
+
Dynamic: author
|
26
|
+
Dynamic: author-email
|
27
|
+
Dynamic: classifier
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: home-page
|
31
|
+
Dynamic: license-file
|
32
|
+
Dynamic: requires-dist
|
33
|
+
Dynamic: requires-python
|
34
|
+
Dynamic: summary
|
35
|
+
|
36
|
+
# LLUMO SDK
|
37
|
+
|
38
|
+
A lightweight Python SDK to interact with the LLUMO API for evaluating LLM responses using analytics like Confidence, Clarity, Context, etc.
|
39
|
+
|
40
|
+
## 🔧 Features
|
41
|
+
|
42
|
+
- API wrapper for LLUMO's analytics endpoints
|
43
|
+
- Supports multiple analytics types
|
44
|
+
|
45
|
+
## 📦 Installation
|
46
|
+
|
47
|
+
Clone and install locally:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
git clone https://github.com/yourusername/llumo-sdk.git
|
51
|
+
cd llumo-sdk
|
52
|
+
pip install .
|
llumo-0.2.5/setup.py
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# setup.py
|
2
|
+
import os
|
3
|
+
from setuptools import setup, find_packages
|
4
|
+
|
5
|
+
# Cloud Build will set TAG_NAME from the git tag.
|
6
|
+
VERSION = os.environ.get("TAG_NAME", "0.0.1.dev0")
|
7
|
+
|
8
|
+
# PyPI expects PEP 440 compliant versions.
|
9
|
+
# If your git tags are like 'v1.0.0', strip the leading 'v'.
|
10
|
+
if VERSION.startswith("v"):
|
11
|
+
VERSION = VERSION[1:]
|
12
|
+
|
13
|
+
|
14
|
+
# --- Requirements ---
|
15
|
+
# Read requirements from requirements.txt and filter out build dependencies
|
16
|
+
def read_requirements():
|
17
|
+
try:
|
18
|
+
with open("requirements.txt", encoding="utf-8") as f:
|
19
|
+
requirements = []
|
20
|
+
for line in f.read().splitlines():
|
21
|
+
line = line.strip()
|
22
|
+
# Skip empty lines and comments
|
23
|
+
if line and not line.startswith("#"):
|
24
|
+
# Filter out build/dev dependencies
|
25
|
+
if not any(
|
26
|
+
dev_pkg in line.lower()
|
27
|
+
for dev_pkg in ["setuptools", "twine", "wheel", "build"]
|
28
|
+
):
|
29
|
+
requirements.append(line)
|
30
|
+
return requirements
|
31
|
+
except FileNotFoundError:
|
32
|
+
print("WARNING: requirements.txt not found. Using fallback requirements.")
|
33
|
+
# Fallback requirements based on your requirements.txt
|
34
|
+
return [
|
35
|
+
"requests>=2.0.0",
|
36
|
+
"python-socketio",
|
37
|
+
"python-dotenv",
|
38
|
+
"openai==1.75.0",
|
39
|
+
"google-generativeai==0.8.5",
|
40
|
+
]
|
41
|
+
|
42
|
+
|
43
|
+
install_requires = read_requirements()
|
44
|
+
print(f"Install requires: {install_requires}") # Debug print
|
45
|
+
|
46
|
+
# --- Long Description ---
|
47
|
+
# Read the contents of your README file
|
48
|
+
long_description = ""
|
49
|
+
try:
|
50
|
+
with open("README.md", encoding="utf-8") as f:
|
51
|
+
long_description = f.read()
|
52
|
+
except FileNotFoundError:
|
53
|
+
pass
|
54
|
+
|
55
|
+
setup(
|
56
|
+
name="llumo",
|
57
|
+
version=VERSION,
|
58
|
+
description="Python SDK for interacting with the Llumo ai API.",
|
59
|
+
author="Llumo",
|
60
|
+
author_email="product@llumo.ai",
|
61
|
+
url="https://www.llumo.ai/",
|
62
|
+
long_description=long_description,
|
63
|
+
long_description_content_type="text/markdown",
|
64
|
+
packages=find_packages(),
|
65
|
+
install_requires=install_requires,
|
66
|
+
python_requires=">=3.7",
|
67
|
+
classifiers=[
|
68
|
+
"Development Status :: 3 - Alpha",
|
69
|
+
"Intended Audience :: Developers",
|
70
|
+
"License :: OSI Approved :: MIT License",
|
71
|
+
"Programming Language :: Python :: 3",
|
72
|
+
"Programming Language :: Python :: 3.7",
|
73
|
+
"Programming Language :: Python :: 3.8",
|
74
|
+
"Programming Language :: Python :: 3.9",
|
75
|
+
"Programming Language :: Python :: 3.10",
|
76
|
+
"Programming Language :: Python :: 3.11",
|
77
|
+
],
|
78
|
+
)
|
79
|
+
|
80
|
+
print(f"Building version: {VERSION}")
|
llumo-0.2.3/PKG-INFO
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: llumo
|
3
|
-
Version: 0.2.3
|
4
|
-
Summary: Python SDK for interacting with the Llumo ai API.
|
5
|
-
Home-page: https://www.llumo.ai/
|
6
|
-
Author: Llumo
|
7
|
-
Author-email: product@llumo.ai
|
8
|
-
Requires-Python: >=3.7
|
9
|
-
Description-Content-Type: text/markdown
|
10
|
-
License-File: LICENSE
|
11
|
-
Requires-Dist: requests>=2.0.0
|
12
|
-
Requires-Dist: setuptools>=58.1.0
|
13
|
-
Requires-Dist: twine>=6.1.0
|
14
|
-
Requires-Dist: wheel>=0.45.1
|
15
|
-
Requires-Dist: build>=1.2.2.post1
|
16
|
-
Requires-Dist: python-socketio
|
17
|
-
Requires-Dist: python-dotenv
|
18
|
-
Requires-Dist: openai==1.75.0
|
19
|
-
Requires-Dist: google-generativeai==0.8.5
|
20
|
-
Dynamic: author
|
21
|
-
Dynamic: author-email
|
22
|
-
Dynamic: description-content-type
|
23
|
-
Dynamic: home-page
|
24
|
-
Dynamic: license-file
|
25
|
-
Dynamic: requires-dist
|
26
|
-
Dynamic: requires-python
|
27
|
-
Dynamic: summary
|
@@ -1,27 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: llumo
|
3
|
-
Version: 0.2.3
|
4
|
-
Summary: Python SDK for interacting with the Llumo ai API.
|
5
|
-
Home-page: https://www.llumo.ai/
|
6
|
-
Author: Llumo
|
7
|
-
Author-email: product@llumo.ai
|
8
|
-
Requires-Python: >=3.7
|
9
|
-
Description-Content-Type: text/markdown
|
10
|
-
License-File: LICENSE
|
11
|
-
Requires-Dist: requests>=2.0.0
|
12
|
-
Requires-Dist: setuptools>=58.1.0
|
13
|
-
Requires-Dist: twine>=6.1.0
|
14
|
-
Requires-Dist: wheel>=0.45.1
|
15
|
-
Requires-Dist: build>=1.2.2.post1
|
16
|
-
Requires-Dist: python-socketio
|
17
|
-
Requires-Dist: python-dotenv
|
18
|
-
Requires-Dist: openai==1.75.0
|
19
|
-
Requires-Dist: google-generativeai==0.8.5
|
20
|
-
Dynamic: author
|
21
|
-
Dynamic: author-email
|
22
|
-
Dynamic: description-content-type
|
23
|
-
Dynamic: home-page
|
24
|
-
Dynamic: license-file
|
25
|
-
Dynamic: requires-dist
|
26
|
-
Dynamic: requires-python
|
27
|
-
Dynamic: summary
|
llumo-0.2.3/setup.py
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
# from setuptools import setup, find_packages
|
2
|
-
|
3
|
-
|
4
|
-
# install_requires = [
|
5
|
-
# "requests>=2.0.0",
|
6
|
-
# "websocket-client>=1.0.0",
|
7
|
-
# "pandas>=1.0.0",
|
8
|
-
# "numpy>=1.0.0",
|
9
|
-
# "python-socketio[client]==5.13.0",
|
10
|
-
# "python-dotenv==1.1.0",
|
11
|
-
# "openai==1.75.0",
|
12
|
-
# "google-generativeai==0.8.5",
|
13
|
-
# ]
|
14
|
-
# setup(
|
15
|
-
# name="llumo",
|
16
|
-
# version="0.1.9",
|
17
|
-
# description="Python SDK for interacting with the Llumo ai API.",
|
18
|
-
# author="Llumo",
|
19
|
-
# author_email="product@llumo.ai",
|
20
|
-
# packages=find_packages(),
|
21
|
-
# install_requires=install_requires,
|
22
|
-
# python_requires=">=3.7",
|
23
|
-
# include_package_data=True,
|
24
|
-
# url="https://www.llumo.ai/",
|
25
|
-
# license="Proprietary",
|
26
|
-
# )
|
27
|
-
|
28
|
-
|
29
|
-
# setup.py
|
30
|
-
import os
|
31
|
-
from setuptools import setup, find_packages
|
32
|
-
|
33
|
-
# Cloud Build will set TAG_NAME from the git tag.
|
34
|
-
VERSION = os.environ.get("TAG_NAME", "0.0.1.dev0")
|
35
|
-
|
36
|
-
# PyPI expects PEP 440 compliant versions.
|
37
|
-
# If your git tags are like 'v1.0.0', strip the leading 'v'.
|
38
|
-
if VERSION.startswith("v"):
|
39
|
-
VERSION = VERSION[1:]
|
40
|
-
|
41
|
-
# --- Requirements ---
|
42
|
-
# Read requirements from requirements.txt
|
43
|
-
try:
|
44
|
-
with open("requirements.txt", encoding="utf-8") as f:
|
45
|
-
required = f.read().splitlines()
|
46
|
-
except FileNotFoundError:
|
47
|
-
print("WARNING: requirements.txt not found. Setting install_requires to empty.")
|
48
|
-
required = []
|
49
|
-
|
50
|
-
# --- Long Description ---
|
51
|
-
# Read the contents of your README file
|
52
|
-
long_description = ""
|
53
|
-
# setup(
|
54
|
-
# name="llumo",
|
55
|
-
# version="0.1.9",
|
56
|
-
# description="Python SDK for interacting with the Llumo ai API.",
|
57
|
-
# author="Llumo",
|
58
|
-
# author_email="product@llumo.ai",
|
59
|
-
# packages=find_packages(),
|
60
|
-
# install_requires=install_requires,
|
61
|
-
# python_requires=">=3.7",
|
62
|
-
# include_package_data=True,
|
63
|
-
# url="https://www.llumo.ai/",
|
64
|
-
# license="Proprietary",
|
65
|
-
# )
|
66
|
-
setup(
|
67
|
-
name="llumo", # TODO: Replace with your SDK's actual name
|
68
|
-
version=VERSION,
|
69
|
-
description="Python SDK for interacting with the Llumo ai API.",
|
70
|
-
author="Llumo",
|
71
|
-
author_email="product@llumo.ai",
|
72
|
-
url="https://www.llumo.ai/",
|
73
|
-
long_description=long_description,
|
74
|
-
long_description_content_type="text/markdown",
|
75
|
-
packages=find_packages(),
|
76
|
-
install_requires=required,
|
77
|
-
python_requires=">=3.7", # TODO: Specify your minimum Python version
|
78
|
-
)
|
79
|
-
|
80
|
-
print(f"Building version: {VERSION}")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|