Skip to content

Commit

Permalink
add embedding engine to telem
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat committed Dec 7, 2023
1 parent ef79649 commit 33de34f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/endpoints/api/workspace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function apiWorkspaceEndpoints(app) {
await Telemetry.sendTelemetry("workspace_created", {
multiUserMode: multiUserMode(response),
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
});
response.status(200).json({ workspace, message });
Expand Down Expand Up @@ -488,6 +489,7 @@ function apiWorkspaceEndpoints(app) {
const result = await chatWithWorkspace(workspace, message, mode);
await Telemetry.sendTelemetry("sent_chat", {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
});
response.status(200).json({ ...result });
Expand Down
2 changes: 2 additions & 0 deletions server/endpoints/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function chatEndpoints(app) {
await Telemetry.sendTelemetry("sent_chat", {
multiUserMode: multiUserMode(response),
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
});
response.end();
Expand Down Expand Up @@ -154,6 +155,7 @@ function chatEndpoints(app) {
{
multiUserMode: multiUserMode(response),
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
},
user?.id
Expand Down
1 change: 1 addition & 0 deletions server/endpoints/workspaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function workspaceEndpoints(app) {
{
multiUserMode: multiUserMode(response),
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
},
user?.id
Expand Down
2 changes: 2 additions & 0 deletions server/models/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const Document = {

await Telemetry.sendTelemetry("documents_embedded_in_workspace", {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
});
return { failed: failedToEmbed, embedded };
Expand Down Expand Up @@ -105,6 +106,7 @@ const Document = {

await Telemetry.sendTelemetry("documents_removed_in_workspace", {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "pinecone",
});
return true;
Expand Down

0 comments on commit 33de34f

Please sign in to comment.