Skip to content

Commit

Permalink
make it work (#328)
Browse files Browse the repository at this point in the history
* Somewhat working dev + build

* Working API calls.

* switch completely to new "/api/" style.

* Conform to the API.
  • Loading branch information
dglazkov authored Apr 29, 2024
1 parent 7870106 commit 476e844
Show file tree
Hide file tree
Showing 31 changed files with 6,980 additions and 47 deletions.
620 changes: 615 additions & 5 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion seeds/chunker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"outDir": "./dist"
},
"include": ["src/**/*", "tests/**/*"],
"extends": "@google-labs/tsconfig/base.json"
"extends": "../../core/tsconfig/base.json"
}
2 changes: 1 addition & 1 deletion seeds/gemini-guide/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tsBuildInfoFile": "dist/tsc/.tsbuildinfo"
},
"include": ["src/js/**/*"],
"extends": "@google-labs/tsconfig/base.json"
"extends": "../../core/tsconfig/base.json"
}
4 changes: 2 additions & 2 deletions seeds/palm-lite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"outDir": "./dist"
},
"include": ["src/**/*", "tests/**/*"],
"extends": "@google-labs/tsconfig/base.json",
"extends": "../../core/tsconfig/base.json",
"typedocOptions": {
"entryPoints": "./src/index.ts",
"out": "./docs/api",
"githubPages": "false",
"githubPages": "false"
}
}
24 changes: 24 additions & 0 deletions seeds/team-experiments/api/secrets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @license
* Copyright 2024 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

export const edge = true;
export const headers = {
"Content-Type": "application/json",
};
export const streaming = true;

import { config } from "dotenv";

export default async function handler() {
const { parsed, error } = config();
let result;
if (error) {
result = JSON.stringify({ error: "Could not retrieve secrets" });
} else {
result = JSON.stringify({ parsed });
}
return new Response(result, { status: 200 });
}
Loading

0 comments on commit 476e844

Please sign in to comment.