-
Notifications
You must be signed in to change notification settings - Fork 14
Tentative implementation for testing prompts in chatbot (WIP) #4253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: llm.chatbot.prototype.2
Are you sure you want to change the base?
Changes from all commits
990f07f
08ecb3c
6533700
1d08c51
de38091
c86b124
ff0c044
4a5adde
edf2f0e
59f7c99
3dbb925
012440e
3a90c03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,13 +44,13 @@ export async function launch() { | |
| setAppMiddlewares(app, genomes, doneLoading) | ||
|
|
||
| console.log('setting server routes ...') | ||
| const routeCallbacks = await setOptionalRoutes(app) | ||
| const routeCallbacks = await setOptionalRoutes(app, genomes) | ||
| console.log('may set auth routes ...') | ||
| /* | ||
| !!! the order of middlewares is critical, must be set before data routes !!! | ||
| - so that a request will be inspected by auth before allowing | ||
| to proceed to any *protected* route handler | ||
| */ | ||
| !!! the order of middlewares is critical, must be set before data routes !!! | ||
| - so that a request will be inspected by auth before allowing | ||
| to proceed to any *protected* route handler | ||
| */ | ||
| await authApi.maySetAuthRoutes(app, genomes, basepath, serverconfig) | ||
|
|
||
| const routes = await Promise.all(routeFiles) | ||
|
|
@@ -63,11 +63,11 @@ export async function launch() { | |
| basepath: serverconfig.basepath || '', | ||
| apiJson: path.join(__dirname, '../../public/docs/server-api.json') | ||
| /* | ||
| As an alternative to manually adding/removing imports in shared/types/src/routes, | ||
| you may temporarily uncomment below to generate runtime route checker code, | ||
| should only uncomment when a file has been added or deleted in | ||
| shared/types/src/routes and not when modified. | ||
| */ | ||
| As an alternative to manually adding/removing imports in shared/types/src/routes, | ||
| you may temporarily uncomment below to generate runtime route checker code, | ||
| should only uncomment when a file has been added or deleted in | ||
| shared/types/src/routes and not when modified. | ||
| */ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like the indentations are being removed. Make sure |
||
| // , types: serverconfig.debugmode && { | ||
| // importDir: '../routes', | ||
| // outputFile: path.join(__dirname, '../../shared/types/src/checkers/routes.ts') | ||
|
|
@@ -120,11 +120,11 @@ export async function launch() { | |
| if (exitCode) console.error('\n!!!\n' + err + '\n\n') | ||
| else console.log('\n!!!\n' + err + '\n\n') | ||
| /* | ||
| when the app server is monitored by another process via the command line, | ||
| process.exit(1) is required to stop execution flow with `set -e` | ||
| and thereby avoid unnecessary endless restarts of an invalid server | ||
| init with bad config, data, and/or code | ||
| */ | ||
| when the app server is monitored by another process via the command line, | ||
| process.exit(1) is required to stop execution flow with `set -e` | ||
| and thereby avoid unnecessary endless restarts of an invalid server | ||
| init with bad config, data, and/or code | ||
| */ | ||
| const msg = err?.stack || err | ||
| if (serverconfig.slackWebhookUrl) { | ||
| const url = serverconfig.URL | ||
|
|
@@ -225,9 +225,9 @@ async function setOptionalRoutes(app) { | |
| if (!serverconfig.routeSetters) return | ||
| const routeCallbacks: OptionalRouteCallbacks = {} | ||
| for (const fname of serverconfig.routeSetters) { | ||
| if (fname.endsWith('.js')) { | ||
| if (fname.endsWith('.js') || fname.endsWith('.ts')) { | ||
| const _ = await import(fname) | ||
| const d = _.default(app, basepath) | ||
| const d = _.default(app, basepath, genomes) | ||
| if (d?.setCloseServer && fname.includes('coverage')) { | ||
| routeCallbacks.setCloseServer = d.setCloseServer | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
aifilespath is./proteinpaint/server/dataset/ai/termdb.test.json, but this repo’s file lives atserver/dataset/ai/termdb.test.json. SincereadJSONFile()reads paths relative toprocess.cwd(), running from theserver/workspace will not find./proteinpaint/...(there is noserver/proteinpaint/dir). Update this to a path that resolves correctly from the server workspace (or make it absolute viaimport.meta.url).