llumo 0.2.41__tar.gz → 0.2.42__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.41/llumo.egg-info → llumo-0.2.42}/PKG-INFO +1 -1
- {llumo-0.2.41 → llumo-0.2.42}/llumo/client.py +49 -47
- {llumo-0.2.41 → llumo-0.2.42}/llumo/llumoSessionContext.py +3 -2
- {llumo-0.2.41 → llumo-0.2.42/llumo.egg-info}/PKG-INFO +1 -1
- {llumo-0.2.41 → llumo-0.2.42}/LICENSE +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/MANIFEST.in +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/README.md +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/__init__.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/callback.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/callbacks-0.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/chains.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/exceptions.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/execution.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/functionCalling.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/google.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/helpingFuntions.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/llumoLogger.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/models.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/openai.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo/sockets.py +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo.egg-info/SOURCES.txt +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo.egg-info/dependency_links.txt +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo.egg-info/requires.txt +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/llumo.egg-info/top_level.txt +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/setup.cfg +0 -0
- {llumo-0.2.41 → llumo-0.2.42}/setup.py +0 -0
|
@@ -820,6 +820,8 @@ class LlumoClient:
|
|
|
820
820
|
allBatches = []
|
|
821
821
|
for index, row in dataframe.iterrows():
|
|
822
822
|
# Extract required fields
|
|
823
|
+
query = row.get("query", "")
|
|
824
|
+
context = row.get("context", "")
|
|
823
825
|
tools = row.get("tools", "")
|
|
824
826
|
groundTruth = row.get("groundTruth", "")
|
|
825
827
|
messageHistory = row.get("messageHistory", "")
|
|
@@ -827,42 +829,43 @@ class LlumoClient:
|
|
|
827
829
|
output = row.get("output", "")
|
|
828
830
|
|
|
829
831
|
# Initialize query and context
|
|
830
|
-
query = ""
|
|
831
|
-
context = ""
|
|
832
|
-
|
|
833
|
-
# Process prompt template if provided
|
|
834
|
-
if promptTemplate:
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
832
|
+
# query = ""
|
|
833
|
+
# context = ""
|
|
834
|
+
|
|
835
|
+
# # Process prompt template if provided
|
|
836
|
+
# if promptTemplate:
|
|
837
|
+
# # Extract template variables
|
|
838
|
+
# keys = re.findall(r"{{(.*?)}}", promptTemplate)
|
|
839
|
+
|
|
840
|
+
# if not all([key in dataframe.columns for key in keys]):
|
|
841
|
+
# # raise LlumoAIError.InvalidPromptTemplate()
|
|
842
|
+
# break
|
|
843
|
+
|
|
844
|
+
# # Populate template and separate query/context
|
|
845
|
+
# populated_template = promptTemplate
|
|
846
|
+
# for key in keys:
|
|
847
|
+
# value = row.get(key, "")
|
|
848
|
+
# if isinstance(value, str):
|
|
849
|
+
# length = len(value.split()) * 1.5
|
|
850
|
+
# if length <= 50:
|
|
851
|
+
# # Short value - include in query via template
|
|
852
|
+
# temp_obj = {key: value}
|
|
853
|
+
# populated_template = getInputPopulatedPrompt(populated_template, temp_obj)
|
|
854
|
+
# else:
|
|
855
|
+
# # Long value - add to context
|
|
856
|
+
# context += f" {key}: {value}, "
|
|
857
|
+
|
|
858
|
+
# query = populated_template.strip()
|
|
859
|
+
|
|
860
|
+
# # Add any remaining context from other fields
|
|
861
|
+
# if not context.strip():
|
|
862
|
+
# for key, value in row.items():
|
|
863
|
+
# if key not in keys and isinstance(value, str) and value.strip():
|
|
864
|
+
# context += f" {key}: {value}, "
|
|
865
|
+
# else:
|
|
866
|
+
# # No prompt template - use direct query and context fields
|
|
867
|
+
# query = row.get("query", "")
|
|
868
|
+
# context = row.get("context", "")
|
|
866
869
|
|
|
867
870
|
INPUT_TOKEN_PRICE = 0.0000025
|
|
868
871
|
OUTPUT_TOKEN_PRICE = 0.00001
|
|
@@ -885,7 +888,10 @@ class LlumoClient:
|
|
|
885
888
|
"totalTokens": totalTokens,
|
|
886
889
|
"cost": round(cost, 8),
|
|
887
890
|
"modelsUsed": "gpt-4o",
|
|
888
|
-
"latency":round(random.uniform(1,1.6),2)
|
|
891
|
+
"latency":round(random.uniform(1,1.6),2),
|
|
892
|
+
"promptTemplate": promptTemplate,
|
|
893
|
+
"systemInstructions": systemInstructions
|
|
894
|
+
|
|
889
895
|
|
|
890
896
|
}
|
|
891
897
|
currentTime = datetime(2025, 8, 2, 10, 20, 15, tzinfo=timezone.utc)
|
|
@@ -910,8 +916,7 @@ class LlumoClient:
|
|
|
910
916
|
"columnID":rowID,
|
|
911
917
|
"rowID":columnID,
|
|
912
918
|
"latency": random.randint(1000, 1500),
|
|
913
|
-
|
|
914
|
-
"systemInstructions":systemInstructions
|
|
919
|
+
|
|
915
920
|
|
|
916
921
|
}
|
|
917
922
|
|
|
@@ -921,7 +926,7 @@ class LlumoClient:
|
|
|
921
926
|
for i, batch in enumerate(allBatches, start=1):
|
|
922
927
|
|
|
923
928
|
try:
|
|
924
|
-
#
|
|
929
|
+
# print(batch)
|
|
925
930
|
response = postForDebugLogs(record=batch,workspaceID=workspaceID)
|
|
926
931
|
|
|
927
932
|
# failure case inside response
|
|
@@ -938,9 +943,6 @@ class LlumoClient:
|
|
|
938
943
|
|
|
939
944
|
print("Records Uploaded successfully. You may now review your logs at: https://app.llumo.ai/logs")
|
|
940
945
|
|
|
941
|
-
|
|
942
|
-
# Wait for results
|
|
943
|
-
|
|
944
946
|
# def evaluateMultiple(
|
|
945
947
|
# self,
|
|
946
948
|
# data,
|
|
@@ -2082,13 +2084,13 @@ class LlumoClient:
|
|
|
2082
2084
|
definationMapping=self.definationMapping,
|
|
2083
2085
|
)
|
|
2084
2086
|
|
|
2085
|
-
def
|
|
2087
|
+
def getEvaluateMultiple(
|
|
2086
2088
|
self,
|
|
2087
2089
|
data,
|
|
2088
2090
|
evals
|
|
2089
2091
|
) -> List:
|
|
2090
2092
|
|
|
2091
|
-
print("Evaluating multiple data with evals:", data, evals)
|
|
2093
|
+
# print("Evaluating multiple data with evals:", data, evals)
|
|
2092
2094
|
|
|
2093
2095
|
dataID = uuid.uuid4().hex[:36]
|
|
2094
2096
|
|
|
@@ -2105,7 +2107,7 @@ class LlumoClient:
|
|
|
2105
2107
|
"playgroundID": self.playgroundID,
|
|
2106
2108
|
}
|
|
2107
2109
|
|
|
2108
|
-
print("payload", payload)
|
|
2110
|
+
# print("payload", payload)
|
|
2109
2111
|
|
|
2110
2112
|
# Create evaluation
|
|
2111
2113
|
requests.post(
|
|
@@ -2186,7 +2188,7 @@ class LlumoClient:
|
|
|
2186
2188
|
"reasoning": reasoning,
|
|
2187
2189
|
}
|
|
2188
2190
|
|
|
2189
|
-
print(formatted_row)
|
|
2191
|
+
# print(formatted_row)
|
|
2190
2192
|
formatted_results.append(formatted_row)
|
|
2191
2193
|
|
|
2192
2194
|
return formatted_results
|
|
@@ -102,9 +102,10 @@ class LlumoSessionContext(LlumoClient):
|
|
|
102
102
|
"totalTokens": "",
|
|
103
103
|
"cost": "",
|
|
104
104
|
"modelsUsed": "gpt-4o",
|
|
105
|
+
"promptTemplate": promptTemplate,
|
|
106
|
+
"systemInstructions": systemInstructions
|
|
105
107
|
},
|
|
106
|
-
|
|
107
|
-
"systemInstructions":systemInstructions
|
|
108
|
+
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
self.threadLlumoRun = _ctxLlumoRun.set(llumoRun)
|
|
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
|
|
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
|