Comments (12)
@Igosuki that works for me, just had to add quotes around user
however, there is still something missing: column "profile.team_owner". I had to remove from the query in the code to make it work
from lunary.
@Igosuki Thanks for suggesting "public"."app_user" table which is missing in setup_dump.sql table.
@andrey59412678 am also getting the same error in the web page (network tab) however I just created a column in profile table as team_owner as uuid() type and the error got fixed. But, am not sure about the data type and relation for this column.
Can anyone suggest a fix for this @vincelwt @pAkalpa ?
from lunary.
Hi @prazevj,
The correct table definition for profile
is the following:
create table "public"."profile" (
"id" uuid not null,
"updated_at" timestamptz,
"email" text,
"name" text,
"plan" text not null default 'free' ::text,
"team_owner" uuid,
constraint "profile_id_fkey1" foreign key ("id") references "auth"."users" ("id") on delete cascade,
constraint "profile_id_fkey" foreign key ("id") references "auth"."users" ("id") on delete cascade,
constraint "profile_team_owner_fkey" foreign key ("team_owner") references "public"."profile" ("id"),
primary key ("id")
);
We'll make a cleaner database schema next week. We'll make sure to always keep setup-dump.sql
after this. Sorry for the inconvenience!
from lunary.
@ninehills The commit e36e498 solved the issue. Please Update Repo and try again.
from lunary.
@ninehills The commit e36e498 solved the issue. Please Update Repo and try again.
I have already used the latest version, but it still gives that error.
from lunary.
@ninehills I apologize for suggesting that it was fixed in the first place. My mistake!. The error appears to be occurring at line number 144 in the setup-dump.sql file. This might be because the public.app_user table hasn't been created yet. You can check the specific code snippet here
@vincelwt @hughcrt any comments
from lunary.
This worked for me :
CREATE TABLE "public"."app_user" (
"created_at" timestamptz DEFAULT now(),
"app" uuid,
"id" bigserial PRIMARY KEY,
"external_id" text,
"last_seen" timestamptz,
"props" jsonb
);
CREATE POLICY app_user_owner_policy ON public.app_user USING ((( SELECT app.owner
FROM public.app
WHERE (app.id = app_user.app)) = auth.uid()));
ALTER TABLE public.run ADD COLUMN user bigint;
from lunary.
@hughcrt Thank you. It would be great if we can have a clear and cleaner self-host steps.
While using the self-hosted version in the callback handler code
res = requests.get(f"{self.__api_url}/api/app/{self.__app_id}")
this URL is giving me Internal Server Error. I tried changing the DEFAULT_API_URL
and also have tried setting the LLMONITOR_API_URL
, LLMONITOR_APP_ID
. Unable to connect to the api endpoint. Any workaround or troubleshooting steps could you recommend ?
Note: Hosted on Supabase (Self-Host)
from lunary.
I can confirm the above issues (initial SQL not working, requires fixes discussed above) plus the following
- email verification has localhost:3000 as redirect URL (vs. the vercel project URL - no documentation on where / how to tell the system its deployment URL). After manually changing the URL in the email, the redirect from there with
?code=....
has localhost:3000 in it again. -> needs to be set at https://supabase.com/dashboard/project/{your-project-id}/auth/url-configuration - 406 authentication failures from the frontend when calling supabase REST APIs. (even after deleting the user and all data in supabase and re-trying) - "JSON object requested, multiple (or no) rows returned"
- frontend making various calls to
llmonitor.featurebase.app
which is does not really look like a self-deployed setup
I can help testing a new version but can't really help with development
from lunary.
Hi guys! Apologies about those issues, we're currently fully focused on fixing some core issues with the python module and feedback tracking and will work on improving self hosting as soon as we have a bit more time on our hand.
- Email verification endpoint is configured in Supabase I think? If you're self hosting supabase that would be in the Supaabse env variables
- Not sure about the 406 errors, could you share screenshot of the console logs so we can try to pinpoint where they are?
- Good call about
llmonitor.featurebase.app
, I'll disable those in the self hosted version
from lunary.
If you're self hosting supabase that would be in the Supaabse env variables
I can't see a related env var in the template - there's only the ones for resend.com
Not sure about the 406 errors, could you share screenshot of the console logs so we can try to pinpoint where they are?
This is the first one, all following fail the same way:
https://{my-tenant}.supabase.co/rest/v1/profile?select=id%2Cemail%2Cname%2Cupdated_at%2Cplan%2Cteam_owner&id=eq.6cfa5cd5-1413-4293-a1f5-1163e0423e26
Result is a 406, the body contains:
{
"code": "PGRST116",
"details": "The result contains 0 rows",
"hint": null,
"message": "JSON object requested, multiple (or no) rows returned"
}
My best guess is that the initialization with the first user is not working as intended. After resetting everything and retrying, in supabase there is an account under "authentication" but all the tables are still empty. So the initial setup click flow is not actually creating a user in llmonitor, just the supabase auth entry. My first guess is that is silently fails somewhere e.g. because the DB schema is not correct. my vercel logs are empty. For me: pausing this until there is a reliable DB schema setup script that does not make the app fail.
from lunary.
Hi,
We've fixed self hosting. It's been tested internally and by one of our users and it seems to work fine. Here are the instructions:
- Setup a new Supabase project (don't reuse the previous one, as the setup script will fail if the tables already exist).
- Clone the repo and deploy it to Vercel
- Look at
.env.example
to see what environment variables you need to set on Vercel - Open the Supabase Admin dashboard
4.1. Go toDatabase > Webhooks
and click on "Enable webhooks"
4.2. Copy the content ofsetup-dump.sql
in the SQL editor. Replace<your_vercel_project_url>
by the actual URL at the end of the script and run it.
4.3. Go toAuthentication > Url Configuration
and replacehttp://localhost:3000
by your Vercel project url.
Please let me know if it works for you!
@ninehills @Igosuki @nkuehn @prazevj
from lunary.
Related Issues (20)
- Does the official plan to provide more ways of self-hosting, such as Docker HOT 2
- LunaryModule not found - Langchain HOT 6
- Streaming Mode with openai package cause LLMonitor to throw error HOT 1
- Sorry to be that guy... *types*? HOT 3
- Should't this be DATABASE_URL? HOT 3
- Unable to create local deployment HOT 2
- Server-side error with vercel 'ai' npm package HOT 4
- relation "tag_cache" does not exist - relation "model_name_cache" does not exist HOT 3
- getting started to run locally - errors with npm run dev HOT 12
- 404 on Ops Submodule HOT 1
- instance of BaseCallbackHandler expected HOT 1
- Confused about the Self-Hosted Community tier HOT 1
- Self hosting errors HOT 1
- Errors while self hosting HOT 3
- Source of benchmark page HOT 1
- Feature: Adding tags via langchain calls HOT 5
- Self hosted: High db usage while idle HOT 4
- Best way to trace cached LLM and tool calls HOT 20
- Tags not displaying in tools traces HOT 4
- frontend env variable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lunary.