Skip to content

Commit

Permalink
changed metadata.txt to metadata.sql for easier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Aug 18, 2023
1 parent a8ff91b commit 34f2dd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

def generate_prompt(question, prompt_file="prompt.md", metadata_file="metadata.txt"):
def generate_prompt(question, prompt_file="prompt.md", metadata_file="metadata.sql"):
with open(prompt_file, "r") as f:
prompt = f.read()

Expand All @@ -27,7 +27,7 @@ def get_tokenizer_model(model_name):
)
return tokenizer, model

def run_inference(question, prompt_file="prompt.md", metadata_file="metadata.txt"):
def run_inference(question, prompt_file="prompt.md", metadata_file="metadata.sql"):
tokenizer, model = get_tokenizer_model("defog/starcoder-finetune-v3")
prompt = generate_prompt(question, prompt_file, metadata_file)

Expand Down
10 changes: 4 additions & 6 deletions metadata.txt → metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ CREATE TABLE product_suppliers (
supply_price DECIMAL(10,2) -- Unit price charged by supplier
);

===
Joinable table/column combinations:
- sales.product_id can be joined with products.product_id
- sales.customer_id can be joined with customers.customer_id
- sales.salesperson_id can be joined with salespeople.salesperson_id
- product_suppliers.product_id can be joined with products.product_id
-- sales.product_id can be joined with products.product_id
-- sales.customer_id can be joined with customers.customer_id
-- sales.salesperson_id can be joined with salespeople.salesperson_id
-- product_suppliers.product_id can be joined with products.product_id

0 comments on commit 34f2dd1

Please sign in to comment.