diff --git a/valhalla/jawn/src/controllers/public/requestController.ts b/valhalla/jawn/src/controllers/public/requestController.ts index 6e9cec0c4..50c67fa4c 100644 --- a/valhalla/jawn/src/controllers/public/requestController.ts +++ b/valhalla/jawn/src/controllers/public/requestController.ts @@ -273,8 +273,6 @@ export class RequestController extends Controller { requestBody.filter ); - console.log("length of clusters", clusters.data?.length); - if (clusters.error) { this.setStatus(500); } else { diff --git a/valhalla/jawn/src/lib/handlers/EmbeddingsHandler.ts b/valhalla/jawn/src/lib/handlers/EmbeddingsHandler.ts index f3e0db68b..a654aa672 100644 --- a/valhalla/jawn/src/lib/handlers/EmbeddingsHandler.ts +++ b/valhalla/jawn/src/lib/handlers/EmbeddingsHandler.ts @@ -49,7 +49,7 @@ export class EmbeddingsHandler extends AbstractLogHandler { try { const embedding = await openai.embeddings.create({ - input: JSON.stringify(request.properties), // TODO: is this the right thing to do? + input: JSON.stringify(requestBody), // TODO: is this the right thing to do? model: "text-embedding-3-small", }); diff --git a/web/components/templates/clusters/clustersPage.tsx b/web/components/templates/clusters/clustersPage.tsx index e8bede086..49464b972 100644 --- a/web/components/templates/clusters/clustersPage.tsx +++ b/web/components/templates/clusters/clustersPage.tsx @@ -50,20 +50,19 @@ const ClustersPage = () => {

Clusters

c?.x ?? 0), - y: clusters.map((c) => c?.y ?? 0), - type: "scatter", - mode: "markers", - text: clusters.map((c) => c?.cluster ?? ""), - marker: { - size: 10, - color: clusters.map((c) => c?.cluster ?? 0), - }, - hovertext: clusters.map((c) => c?.request_id ?? ""), - }, - ]} + data={uniqueClusters.map((cluster) => ({ + x: clusters + .filter((c) => c?.cluster === cluster) + .map((c) => c?.x ?? 0), + y: clusters + .filter((c) => c?.cluster === cluster) + .map((c) => c?.y ?? 0), + type: "scattergl", + mode: "markers", + hovertext: clusters + .filter((c) => c?.cluster === cluster) + .map((c) => c?.request_id ?? ""), + }))} onClick={(data) => { console.log(data); // @ts-ignore @@ -75,6 +74,8 @@ const ClustersPage = () => { }} layout={{ title: "Clusters", + plot_bgcolor: "transparent", + paper_bgcolor: "transparent", }} />