@llmops/core 0.1.7 → 0.1.8

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.
package/dist/index.mjs CHANGED
@@ -1592,26 +1592,10 @@ const createLLMRequestsDataLayer = (db) => {
1592
1592
  const result = await listRequestsSchema.safeParseAsync(params || {});
1593
1593
  if (!result.success) throw new LLMOpsError(`Invalid parameters: ${result.error.message}`);
1594
1594
  const { limit, offset, configId, variantId, environmentId, provider, model, startDate, endDate, tags } = result.data;
1595
- console.log("[listRequests] Parsed filters:", {
1596
- configId,
1597
- variantId,
1598
- environmentId,
1599
- provider,
1600
- model
1601
- });
1602
1595
  let baseQuery = db.selectFrom("llm_requests");
1603
- if (configId) {
1604
- console.log("[listRequests] Adding configId filter:", configId);
1605
- baseQuery = baseQuery.where("configId", "=", configId);
1606
- }
1607
- if (variantId) {
1608
- console.log("[listRequests] Adding variantId filter:", variantId);
1609
- baseQuery = baseQuery.where("variantId", "=", variantId);
1610
- }
1611
- if (environmentId) {
1612
- console.log("[listRequests] Adding environmentId filter:", environmentId);
1613
- baseQuery = baseQuery.where("environmentId", "=", environmentId);
1614
- }
1596
+ if (configId) baseQuery = baseQuery.where("configId", "=", configId);
1597
+ if (variantId) baseQuery = baseQuery.where("variantId", "=", variantId);
1598
+ if (environmentId) baseQuery = baseQuery.where("environmentId", "=", environmentId);
1615
1599
  if (provider) baseQuery = baseQuery.where("provider", "=", provider);
1616
1600
  if (model) baseQuery = baseQuery.where("model", "=", model);
1617
1601
  if (startDate) baseQuery = baseQuery.where(sql`${col("createdAt")} >= ${startDate.toISOString()}`);
@@ -1624,10 +1608,7 @@ const createLLMRequestsDataLayer = (db) => {
1624
1608
  baseQuery = baseQuery.where(sql`${col("tags")}->>${key} IN (${valueList})`);
1625
1609
  }
1626
1610
  }
1627
- const countQuery = baseQuery.select(sql`COUNT(*)`.as("total"));
1628
- console.log("[listRequests] Count SQL:", countQuery.compile().sql);
1629
- console.log("[listRequests] Count params:", countQuery.compile().parameters);
1630
- const countResult = await countQuery.executeTakeFirst();
1611
+ const countResult = await baseQuery.select(sql`COUNT(*)`.as("total")).executeTakeFirst();
1631
1612
  const total = Number(countResult?.total ?? 0);
1632
1613
  return {
1633
1614
  data: await baseQuery.selectAll().orderBy("createdAt", "desc").limit(limit).offset(offset).execute(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Core LLMOps functionality and utilities",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "hono": "^4.10.7",
52
52
  "kysely": "^0.28.8",
53
53
  "pino": "^10.1.0",
54
- "@llmops/gateway": "^0.1.7"
54
+ "@llmops/gateway": "^0.1.8"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsdown",