Skip to content

Commit

Permalink
attach TTSProvider telem
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat committed Aug 7, 2024
1 parent 50df2d5 commit 1739342
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/endpoints/api/openai/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function apiOpenAICompatibleEndpoints(app) {
workspace.chatProvider ?? process.env.LLM_PROVIDER ?? "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand All @@ -180,6 +181,7 @@ function apiOpenAICompatibleEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand Down
3 changes: 3 additions & 0 deletions server/endpoints/api/workspace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function apiWorkspaceEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_workspace_created", {
workspaceName: workspace?.name || "Unknown Workspace",
Expand Down Expand Up @@ -622,6 +623,7 @@ function apiWorkspaceEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand Down Expand Up @@ -745,6 +747,7 @@ function apiWorkspaceEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand Down
3 changes: 3 additions & 0 deletions server/endpoints/api/workspaceThread/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function apiWorkspaceThreadEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_workspace_thread_created", {
workspaceName: workspace?.name || "Unknown Workspace",
Expand Down Expand Up @@ -416,6 +417,7 @@ function apiWorkspaceThreadEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand Down Expand Up @@ -567,6 +569,7 @@ function apiWorkspaceThreadEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent("api_sent_chat", {
workspaceName: workspace?.name,
Expand Down
2 changes: 2 additions & 0 deletions server/endpoints/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function chatEndpoints(app) {
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
multiModal: Array.isArray(attachments) && attachments?.length !== 0,
TTSSelection: process.env.TTS_PROVIDER || "native",
});

await EventLogs.logEvent(
Expand Down Expand Up @@ -226,6 +227,7 @@ function chatEndpoints(app) {
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
multiModal: Array.isArray(attachments) && attachments?.length !== 0,
TTSSelection: process.env.TTS_PROVIDER || "native",
});

await EventLogs.logEvent(
Expand Down
1 change: 1 addition & 0 deletions server/endpoints/workspaceThreads.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function workspaceThreadEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
},
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 @@ -55,6 +55,7 @@ function workspaceEndpoints(app) {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
},
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 @@ -142,6 +142,7 @@ const Document = {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent(
"workspace_documents_added",
Expand Down Expand Up @@ -185,6 +186,7 @@ const Document = {
LLMSelection: process.env.LLM_PROVIDER || "openai",
Embedder: process.env.EMBEDDING_ENGINE || "inherit",
VectorDbSelection: process.env.VECTOR_DB || "lancedb",
TTSSelection: process.env.TTS_PROVIDER || "native",
});
await EventLogs.logEvent(
"workspace_documents_removed",
Expand Down

0 comments on commit 1739342

Please sign in to comment.