Skip to content
Snippets Groups Projects
Unverified Commit 5093b37c authored by Huu Le's avatar Huu Le Committed by GitHub
Browse files

Add support for Linux (#142)

parent f383f0cb
Branches
Tags
No related merge requests found
---
"create-llama": patch
---
Remove non-working file selectors for Linux
...@@ -17,7 +17,7 @@ jobs: ...@@ -17,7 +17,7 @@ jobs:
matrix: matrix:
node-version: [18, 20] node-version: [18, 20]
python-version: ["3.11"] python-version: ["3.11"]
os: [macos-latest, windows-latest] os: [macos-latest, windows-latest, ubuntu-22.04]
defaults: defaults:
run: run:
shell: bash shell: bash
......
...@@ -151,5 +151,19 @@ export async function createApp({ ...@@ -151,5 +151,19 @@ export async function createApp({
); );
} }
if (
dataSources.some((dataSource) => dataSource.type === "file") &&
process.platform === "linux"
) {
console.log(
yellow(
`You can add your own data files to ${terminalLink(
"data",
`file://${root}/data`,
)} folder manually.`,
),
);
}
console.log(); console.log();
} }
...@@ -136,24 +136,30 @@ export const getDataSourceChoices = ( ...@@ -136,24 +136,30 @@ export const getDataSourceChoices = (
value: "none", value: "none",
}); });
choices.push({ choices.push({
title: "Use an example PDF", title:
process.platform !== "linux"
? "Use an example PDF"
: "Use an example PDF (you can add your own data files later)",
value: "exampleFile", value: "exampleFile",
}); });
} }
choices.push( // Linux has many distros so we won't support file/folder picker for now
{ if (process.platform !== "linux") {
title: `Use local files (${supportedContextFileTypes.join(", ")})`, choices.push(
value: "file", {
}, title: `Use local files (${supportedContextFileTypes.join(", ")})`,
{ value: "file",
title: },
process.platform === "win32" {
? "Use a local folder" title:
: "Use local folders", process.platform === "win32"
value: "folder", ? "Use a local folder"
}, : "Use local folders",
); value: "folder",
},
);
}
if (framework === "fastapi") { if (framework === "fastapi") {
choices.push({ choices.push({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment