-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix: Database Schema #9
Fix: Database Schema #9
Conversation
Why did you switch to main from development that doesn't seem right |
Fixed |
@0x4007 Updated the schema, comments use |
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.
Seems generally okay. Let me see how your database looks
Unused files (4)
|
@0x4007 Could you please check the updated changes ? Have removed |
@0x4007 Have Added Two Separate Tables as per the schema mentioned in the previous comment. Screen.Recording.2024-09-13.at.1.01.47.AM.mov |
embedding Vector(1024) not null, | ||
payload jsonb, | ||
author_id VARCHAR not null, | ||
type text not null default 'issue', |
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.
Why is the default issue on the comments table? Why even add the type column if it's in the comments table?
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.
Its there to ignore, bot comments, and chore issues created. So, while doing vector search we can ignore such issues and comments. I can remove that, but its a feature that could be useful while performing vector search.
Seems mostly good but I didn't see all the headers on the first table. Does it have the payload? Just try and normalize the columns as much as you can. Otherwise not sure why you added the type column if they are separated by type per table. |
Yes, it includes a payload. I've retained the type column to distinguish between bot comments and bot issues. However, I can remove it if needed, as implementing that feature might be beyond the scope of this issue. |
Yes I think its unnecessary if they are separated by type on different tables. |
Removed the Screen.Recording.2024-09-13.at.2.31.36.AM.mov |
Thanks for the thorough QA. You don't need to make a new video on every change! But generally when opening a pull or making major changes a video is useful. The last idea I have (sorry for the last second changes) is to have two columns for the text This is so we can easily do testing in the near future to compare the performance of the plaintext and markdown versions of each comment when reasoning with the LLMs. However the new ChatGPT model Once that is implemented, you don't need to make a QA video. Just let me know and we can merge. Do that for both tables please. |
…m markdown to plaintext
@0x4007 I have added |
I think that only tier5 subscribers can use right now via API. I believe that we are tier4. |
async findSimilarIssues(markdown: string, threshold: number): Promise<IssueType[] | null> { | ||
const embedding = await this.context.adapters.voyage.embedding.createEmbedding(markdown); | ||
const { data, error } = await this.supabase | ||
.from("issues") | ||
.select("*") | ||
.eq("type", "issue") | ||
.textSearch("embedding", embedding.join(",")) | ||
.order("embedding", { foreignTable: "issues", ascending: false }) | ||
.lte("embedding", threshold); | ||
if (error) { | ||
this.context.logger.error("Error finding similar issues", error); | ||
return []; | ||
} | ||
return data; | ||
} | ||
} |
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.
This seems out of scope?
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.
This can be used for issue deduplication and stuff. I think this should be here m.
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.
Disagree but no need to slow down this pull further.
Resolves #8
NULL
comment body for private repository.author_id
now.