Skip to content

Commit

Permalink
fix: compilation issues on some pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jan 22, 2025
1 parent 1a4c611 commit 42f1dff
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 131 deletions.
28 changes: 3 additions & 25 deletions pipes/data-table/src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
// app/api/settings/route.ts
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = 'force-dynamic'
export const dynamic = "force-dynamic";

export async function GET() {
const defaultSettings: Settings = {
analyticsEnabled: true,
openaiApiKey: "",
deepgramApiKey: "",
aiModel: "gpt-4",
aiUrl: "https://api.openai.com/v1",
customPrompt: "",
port: 3030,
dataDir: "default",
disableAudio: false,
ignoredWindows: [],
includedWindows: [],
aiProviderType: "openai",
embeddedLLM: {
enabled: false,
model: "llama3.2:1b-instruct-q4_K_M",
port: 11438,
},
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
user: {}
};
const defaultSettings = getDefaultSettings();

try {
const settingsManager = pipe.settings;
Expand Down
27 changes: 2 additions & 25 deletions pipes/identify-speakers/src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = "force-dynamic";

export async function GET() {
const defaultSettings: Settings = {
openaiApiKey: "",
deepgramApiKey: "",
aiModel: "gpt-4",
aiUrl: "https://api.openai.com/v1",
customPrompt: "",
port: 3030,
dataDir: "default",
disableAudio: false,
ignoredWindows: [],
includedWindows: [],
aiProviderType: "openai",
embeddedLLM: {
enabled: false,
model: "llama3.2:1b-instruct-q4_K_M",
port: 11438,
},
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
user: {
token: "",
},
analyticsEnabled: true,
};
const defaultSettings = getDefaultSettings();

try {
const settingsManager = pipe.settings;
Expand Down
30 changes: 3 additions & 27 deletions pipes/meeting/src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = 'force-dynamic'
export const dynamic = "force-dynamic";

export async function GET() {
const defaultSettings: Settings = {
openaiApiKey: "",
deepgramApiKey: "",
aiModel: "gpt-4",
aiUrl: "https://api.openai.com/v1",
customPrompt: "",
port: 3030,
dataDir: "default",
disableAudio: false,
ignoredWindows: [],
includedWindows: [],
aiProviderType: "openai",
embeddedLLM: {
enabled: false,
model: "llama3.2:1b-instruct-q4_K_M",
port: 11438,
},
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
user: {
token: "",
},
analyticsEnabled: true,
};

const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
Expand Down
30 changes: 3 additions & 27 deletions pipes/rewind/src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = 'force-dynamic'
export const dynamic = "force-dynamic";

export async function GET() {
const defaultSettings: Settings = {
analyticsEnabled: true,
openaiApiKey: "",
deepgramApiKey: "",
aiModel: "gpt-4",
aiUrl: "https://api.openai.com/v1",
customPrompt: "",
port: 3030,
dataDir: "default",
disableAudio: false,
ignoredWindows: [],
includedWindows: [],
aiProviderType: "openai",
embeddedLLM: {
enabled: false,
model: "llama3.2:1b-instruct-q4_K_M",
port: 11438,
},
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
user: {
token: "",
},
};

const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
Expand Down
30 changes: 3 additions & 27 deletions pipes/search/src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = 'force-dynamic'
export const dynamic = "force-dynamic";

export async function GET() {
const defaultSettings: Settings = {
openaiApiKey: "",
deepgramApiKey: "",
aiModel: "gpt-4",
aiUrl: "https://api.openai.com/v1",
customPrompt: "",
port: 3030,
dataDir: "default",
disableAudio: false,
ignoredWindows: [],
includedWindows: [],
aiProviderType: "openai",
embeddedLLM: {
enabled: false,
model: "llama3.2:1b-instruct-q4_K_M",
port: 11438,
},
enableFrameCache: true,
enableUiMonitoring: false,
aiMaxContextChars: 128000,
user: {
token: "",
},
analyticsEnabled: true,
};

const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
Expand Down
1 change: 1 addition & 0 deletions screenpipe-js/node-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,4 @@ const pipe = new NodePipe();
export { pipe };

export * from "../../common/types";
export { getDefaultSettings } from "../../common/utils";

0 comments on commit 42f1dff

Please sign in to comment.