Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

chore: small changes to make pipes work with embedded llm etc

Louis Beaumont84d0067c0724
diff --git a/examples/typescript/pipe-email-daily-log/README.md b/examples/typescript/pipe-email-daily-log/README.md
index 3ebc600e3..55688592b 100644
--- a/examples/typescript/pipe-email-daily-log/README.md
+++ b/examples/typescript/pipe-email-daily-log/README.md
@@ -68,7 +68,7 @@ can be used through CLI also, you can tweak the `pipe.json` to your needs, mine
{
"name": "ollamaApiUrl",
"type": "string",
- "default": "http://localhost:11434/api",
+ "default": "http://localhost:11434/api/chat",
"description": "Ollama API URL"
},
{
diff --git a/examples/typescript/pipe-email-daily-log/pipe.json b/examples/typescript/pipe-email-daily-log/pipe.json
index a566fe72a..5e6308944 100644
--- a/examples/typescript/pipe-email-daily-log/pipe.json
+++ b/examples/typescript/pipe-email-daily-log/pipe.json
@@ -33,7 +33,7 @@
{
"name": "ollamaApiUrl",
"type": "string",
- "default": "http://localhost:11434/api",
+ "default": "http://localhost:11434/api/chat",
"description": "AI API URL, can be ollama, openai, any openai compatible API, risky to use cloud providers due to high usage"
},
{
diff --git a/examples/typescript/pipe-email-daily-log/pipe.ts b/examples/typescript/pipe-email-daily-log/pipe.ts
index 8506409d0..3cca6fc2a 100644
--- a/examples/typescript/pipe-email-daily-log/pipe.ts
+++ b/examples/typescript/pipe-email-daily-log/pipe.ts
@@ -32,6 +32,9 @@ async function generateDailyLog(
`;
const response = await fetch(ollamaApiUrl + "/chat", {
+ headers: {
+ "Content-Type": "application/json",
+ },
method: "POST",
body: JSON.stringify({
model: ollamaModel,
diff --git a/examples/typescript/pipe-llama32-sync-user-conversation-to-notion/pipe.ts b/examples/typescript/pipe-llama32-sync-user-conversation-to-notion/pipe.ts
index b05456ea3..51c3e972a 100644
--- a/examples/typescript/pipe-llama32-sync-user-conversation-to-notion/pipe.ts
+++ b/examples/typescript/pipe-llama32-sync-user-conversation-to-notion/pipe.ts
@@ -75,6 +75,9 @@ async function summarizeConversation(
`;
const response = await fetch(aiApiUrl, {
+ headers: {
+ "Content-Type": "application/json",
+ },
method: "POST",
body: JSON.stringify({
model: aiModel,
diff --git a/examples/typescript/pipe-meeting-summary-by-email/pipe.ts b/examples/typescript/pipe-meeting-summary-by-email/pipe.ts
index 91cc93c90..4cf3b115e 100644
--- a/examples/typescript/pipe-meeting-summary-by-email/pipe.ts
+++ b/examples/typescript/pipe-meeting-summary-by-email/pipe.ts
@@ -13,6 +13,9 @@ async function summarizeAudio(
provide a concise summary of the key points discussed in the meeting.`;
const response = await fetch(aiApiUrl, {
+ headers: {
+ "Content-Type": "application/json",
+ },
method: "POST",
body: JSON.stringify({
model: aiModel,
@@ -79,6 +82,9 @@ async function checkTimeAdjustment(
`;
const response = await fetch(aiApiUrl, {
+ headers: {
+ "Content-Type": "application/json",
+ },
method: "POST",
body: JSON.stringify({
model: aiModel,
diff --git a/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.json b/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.json
index 11f7f6cc7..119fe3ff2 100644
--- a/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.json
+++ b/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.json
@@ -21,7 +21,7 @@
{
"name": "ollamaApiUrl",
"type": "string",
- "default": "http://localhost:11434/api",
+ "default": "http://localhost:11434/api/chat",
"description": "Ollama API URL"
},
{
diff --git a/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.ts b/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.ts
index 2f76d21e1..57628e941 100644
--- a/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.ts
+++ b/examples/typescript/pipe-phi3.5-engineering-team-logs/pipe.ts
@@ -50,7 +50,10 @@ async function generateEngineeringLog(
}
Provide 1-3 relevant tags related to the engineering work.`;
- const response = await fetch(ollamaApiUrl + "/chat", {
+ const response = await fetch(ollamaApiUrl, {
+ headers: {
+ "Content-Type": "application/json",
+ },
method: "POST",
body: JSON.stringify({
model: ollamaModel,
diff --git a/examples/typescript/pipe-screen-to-crm/pipe.json b/examples/typescript/pipe-screen-to-crm/pipe.json
index cdc4219f7..285b53a2b 100644
--- a/examples/typescript/pipe-screen-to-crm/pipe.json
+++ b/examples/typescript/pipe-screen-to-crm/pipe.json
@@ -21,7 +21,7 @@
{
"name": "ollamaApiUrl",
"type": "string",
- "default": "http://localhost:11434/api",
+ "default": "http://localhost:11434/api/chat",
"description": "Ollama API URL"
},
{
diff --git a/examples/typescript/pipe-screen-to-crm/pipe.ts b/examples/typescript/pipe-screen-to-crm/pipe.ts
index 316d02e49..ca1214451 100644
--- a/examples/typescript/pipe-screen-to-crm/pipe.ts
+++ b/examples/typescript/pipe-screen-to-crm/pipe.ts
@@ -98,7 +98,7 @@ Rules:
try {
console.log(`sending request to ollama api: ${ollamaApiUrl}`);
- const response = await fetch(ollamaApiUrl + "/chat", {
+ const response = await fetch(ollamaApiUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({