Skip to content

Dan rag update #1549

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

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pgml-dashboard/src/api/code_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn get_readonly_pool() -> PgPool {
.max_connections(1)
.idle_timeout(std::time::Duration::from_millis(60_000))
.max_lifetime(std::time::Duration::from_millis(60_000))
.connect_lazy(&std::env::var("CHATBOT_DATABASE_URL").expect("CHATBOT_DATABASE_URL not set"))
.connect_lazy(&std::env::var("EDITOR_DATABASE_URL").expect("EDITOR_DATABASE_URL not set"))
.expect("could not build lazy database connection")
})
.clone()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div data-controller="layouts-marketing-section-three-column-card" class="flex-1">
<div class="d-flex flex-column align-items-center p-3 p-lg-4">
<span class="material-symbols-outlined icon-<%- color %> image-top mb-4 text-white"><%- icon %></span>
<span class="material-symbols-outlined icon-<%- color %> image-top mb-4 text-white d-flex justify-content-center align-items-center"><%- icon %></span>
<h6 class="text-center"><%+ title %></h6>
<p class="text-center"><%+ paragraph %></p>
</div>
Expand Down
1 change: 1 addition & 0 deletions pgml-dashboard/src/components/star/star.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ div[data-controller="star"] {
flex-wrap: wrap;
text-align: center;
font-size: 0.8rem;
line-height: 1rem;
}

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
Expand Down
1 change: 1 addition & 0 deletions pgml-dashboard/static/css/modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@
@import "../../src/components/tables/serverless_models/serverless_models.scss";
@import "../../src/components/tables/serverless_pricing/serverless_pricing.scss";
@import "../../src/components/tables/small/table/table.scss";
@import "../../src/components/turbo/turbo_frame/turbo_frame.scss";
4 changes: 2 additions & 2 deletions pgml-dashboard/static/js/utilities/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const generateSql = (task, model, userInput) => {
);`;
} else if (task === "embedded-query") {
return `WITH embedded_query AS (
SELECT pgml.embed ('Alibaba-NLP/gte-base-en-v1.5', '${userInput}')::vector embedding
SELECT pgml.embed('mixedbread-ai/mxbai-embed-large-v1', 'What is Postgres?', '{"prompt": "Represent this sentence for searching relevant passages: "}'::JSONB)::vector embedding
),
context_query AS (
SELECT chunks.chunk FROM chunks
Expand All @@ -42,7 +42,7 @@ SELECT
"task": "conversational",
"model": "meta-llama/Meta-Llama-3-8B-Instruct"
}'::jsonb,
inputs => ARRAY['{"role": "system", "content": "You are a friendly and helpful chatbot."}'::jsonb, replace('{"role": "user", "content": "Given the context answer the following question. ${userInput}? Context:\n\n{CONTEXT}"}', '{CONTEXT}', chunk)::jsonb],
inputs => ARRAY['{"role": "system", "content": "You are a friendly and helpful chatbot."}'::jsonb, jsonb_build_object('role', 'user', 'content', replace('Given the context answer the following question. ${userInput}? Context:\n{CONTEXT}', '{CONTEXT}', chunk))],
args => '{
"max_new_tokens": 100
}'::jsonb
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy