Conversation
kdh29
left a comment
There was a problem hiding this comment.
sounds cool, ill try it out!
|
@kdh29 can you push what you've got so far? |
kcarnold
left a comment
There was a problem hiding this comment.
The container build might not work, we may need to do something like kcarnold/live-notes@e0df2c4
| raise ValueError(f"Invalid generation type: {payload.gtype}") | ||
| result = await nlp.get_suggestion(payload.gtype, payload.doc_context) | ||
| # Pass username for PostHog LLM analytics tracking | ||
| result = await nlp.get_suggestion(payload.gtype, payload.doc_context, username=payload.username) |
There was a problem hiding this comment.
Doesn't Posthog have contexts for things like this?
backend/server.py
Outdated
| posthog_client = None | ||
| if POSTHOG_API_KEY: | ||
| from posthog import Posthog | ||
| posthog_client = Posthog( |
There was a problem hiding this comment.
This is redundant with the code in nlp.py.
frontend/webpack.config.js
Outdated
| const envVars = {}; | ||
| const prefix = 'VITE_PUBLIC_'; | ||
|
|
||
| for (const [key, value] of Object.entries(process.env)) { |
There was a problem hiding this comment.
This runs at build time, but .env gets injected at runtime, so this probably won't work (see my previous comment).
There was a problem hiding this comment.
This needs cleanup, see comments inline.
btw, the build failure is an out-of-sync /frontend/package-lock.json. Jenkins says:
#21 [frontend build 4/6] RUN npm ci
#21 0.398 npm error code EUSAGE
#21 0.400 npm error
#21 0.400 npm error The `npm ci` command can only install with an existing package-lock.json or
#21 0.400 npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
#21 0.400 npm error later to generate a package-lock.json file, then try again.
#21 0.400 npm error
#21 0.400 npm error Clean install a project
#21 0.400 npm error
#21 0.400 npm error Usage:
#21 0.400 npm error npm ci
#21 0.400 npm error
#21 0.400 npm error Options:
#21 0.400 npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
#21 0.400 npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
#21 0.400 npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
#21 0.400 npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
#21 0.400 npm error [--no-bin-links] [--no-fund] [--dry-run]
#21 0.400 npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
#21 0.400 npm error [--workspaces] [--include-workspace-root] [--install-links]
#21 0.400 npm error
#21 0.400 npm error aliases: clean-install, ic, install-clean, isntall-clean
#21 0.400 npm error
#21 0.400 npm error Run "npm help ci" for more info
#21 0.400 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-12-10T03_25_48_909Z-debug-0.log
#21 ERROR: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
Fix it by checking your node / npm version (should match what's in the Dockerfile), then revert package-lock to what was on main, then npm install to regen.
package.json
Outdated
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "dependencies": { | |||
There was a problem hiding this comment.
This package.json is in the wrong place (should be /frontend.
And I actually don't think we need any of these packages; these are for nodejs backends I think.
…-lock.json, remove misplaced package.json, update webpack env handling
|
Unfortunately this is causing crashes on prod because the API key was not configured. There's also a missing variable Errors were: |
Closes: #157