From 55dfd0b6e1cc69f1dbe6dd4c812063ef918ea122 Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Mon, 22 Dec 2025 12:43:43 +0100 Subject: [PATCH] chore: remove outdated llm folder --- llm/.gitignore | 3 - llm/README.md | 42 -- llm/embeddings_benchmark.ts | 81 ---- llm/requirements.txt | 6 - llm/sample_answers.yaml | 804 ------------------------------------ llm/sample_queries.yaml | 69 ---- llm/src/__init__.py | 0 llm/src/gen_samples.py | 162 -------- llm/src/test_data.py | 510 ----------------------- llm/version.txt | 1 - 10 files changed, 1678 deletions(-) delete mode 100644 llm/.gitignore delete mode 100644 llm/README.md delete mode 100644 llm/embeddings_benchmark.ts delete mode 100644 llm/requirements.txt delete mode 100644 llm/sample_answers.yaml delete mode 100644 llm/sample_queries.yaml delete mode 100644 llm/src/__init__.py delete mode 100644 llm/src/gen_samples.py delete mode 100644 llm/src/test_data.py delete mode 100644 llm/version.txt diff --git a/llm/.gitignore b/llm/.gitignore deleted file mode 100644 index e385482073..0000000000 --- a/llm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.venv -.env -**/__pycache__ \ No newline at end of file diff --git a/llm/README.md b/llm/README.md deleted file mode 100644 index cb71e78c50..0000000000 --- a/llm/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Test sample queries of the AI feature - -## Setup - -Create a virtual environment `python -m venv .venv`, activate it `source .venv/bin/activate` and install the requirements `pip install -r requirements.txt`. Put your `OPENAI_API_KEY` in `.env`. - -## Run - -Run the script `python src/gen_samples.py` and check the results in `sample_answers.yaml`. - -## Add queries - -You can add more queries in `sample_queries.yaml`. There are three types of queries: - -### Generate code from a prompt - -```yaml -- type: gen - description: hello world - lang: python3 -``` - -### Modifiy code according to a prompt - -```yaml -- type: edit - description: comment - lang: python3 - code: |- - print("hello world") -``` - -### Fix code given an error - -```yaml -- type: fix - lang: python3 - code: |- - def main(): - return 3 / 0 - error: division by zero -``` diff --git a/llm/embeddings_benchmark.ts b/llm/embeddings_benchmark.ts deleted file mode 100644 index 1920bc212c..0000000000 --- a/llm/embeddings_benchmark.ts +++ /dev/null @@ -1,81 +0,0 @@ -const getWords = async () => { - const response = await fetch("http://localhost:3001/searchData"); - const data: { - asks: { - summary: string; - app: string; - }[]; - } = await response.json(); - const words = data.asks - .map((a) => [ - ...a.summary.split(" ").map((w: string) => w.toLowerCase()), - ...a.app.split(" ").map((w: string) => w.toLowerCase()), - ]) - .flat(); - return words; -}; - -const generateQuery = async (words: string[]) => { - const word1 = words[Math.floor(Math.random() * words.length)]; - const word2 = words[Math.floor(Math.random() * words.length)]; - const word3 = words[Math.floor(Math.random() * words.length)]; - const query = `${word1} ${word2} ${word3}`; - return query.substring(0, 3 + Math.random() * (query.length - 3)); -}; - -async function sendRequest(q: string) { - const time = Date.now(); - - try { - await fetch( - "http://localhost:3001/scripts/query?" + - new URLSearchParams({ - text: q, - }) - ); - return { - time: Date.now() - time, - error: false, - }; - } catch (err) { - return { - time: Date.now() - time, - error: true, - }; - } -} - -async function benchmark() { - // first fetch to mitigate cold start - await fetch( - "http://localhost:3001/scripts/query?" + - new URLSearchParams({ - text: "init", - }) - ); - const words = await getWords(); - const tryouts = [1, 10, 100, 1000, 10000]; - - for (const tryout of tryouts) { - const requests: Promise<{ - time: number; - error: boolean; - }>[] = []; - for (let i = 0; i < tryout; i++) { - const q = await generateQuery(words); - requests.push(sendRequest(q)); - } - const startTime = Date.now(); - const times = await Promise.all(requests); - const duration = Date.now() - startTime; - const avg = times.reduce((a, b) => a + b.time, 0) / times.length; - const errors = times.filter((t) => t.error).length; - console.log(`Average time for ${tryout} simultaneous requests: ${avg}ms`); - console.log( - `Total time for ${tryout} simultaneous requests: ${duration}ms` - ); - console.log(`Number of errors: ${errors}`); - } -} - -benchmark(); diff --git a/llm/requirements.txt b/llm/requirements.txt deleted file mode 100644 index 0848e18112..0000000000 --- a/llm/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -openai==1.30.3 -python-dotenv==1.0.0 -pyyaml==6.0 -tqdm==4.66.3 -anyio>=4.4.0 # not directly required, pinned by Snyk to avoid a vulnerability -zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/llm/sample_answers.yaml b/llm/sample_answers.yaml deleted file mode 100644 index 5ba11333e0..0000000000 --- a/llm/sample_answers.yaml +++ /dev/null @@ -1,804 +0,0 @@ -- answer: |- - ```python - from typing import List, Dict - import psycopg2 - - # Define the resource type for PostgreSQL - class postgresql(TypedDict): - host: str - port: int - user: str - dbname: str - sslmode: str - password: str - - def main(db_config: postgresql) -> List[Dict]: - # Connect to the PostgreSQL database - conn = psycopg2.connect( - host=db_config['host'], - port=db_config['port'], - user=db_config['user'], - password=db_config['password'], - dbname=db_config['dbname'], - sslmode=db_config['sslmode'] - ) - - # Create a cursor object - cursor = conn.cursor() - - # Execute the query to fetch all rows from the orders table - cursor.execute("SELECT * FROM orders") - - # Fetch all rows from the executed query - rows = cursor.fetchall() - - # Get column names from the cursor description - colnames = [desc[0] for desc in cursor.description] - - # Convert rows to a list of dictionaries - result = [dict(zip(colnames, row)) for row in rows] - - # Close the cursor and connection - cursor.close() - conn.close() - - return result - ``` - description: connect to postgres and list the rows in the orders table - lang: python3 - template_prompt: |- - - You have to write a function in Python called "main". Specify the parameter types. Do not call the main function. You should generally return the result. - The "main" function cannot be async. If you need to use async code, you can use the asyncio library. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (has to be IN LOWERCASE). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```python - def main(num: int) -> float: - if num == 0: - raise ValueError("Division by zero is not allowed") - return 3 / num - ``` - - The error occurs because dividing by zero is not allowed in mathematics and will raise a `ZeroDivisionError` in Python. To fix this, we need to check if `num` is zero before performing the division. If `num` is zero, we raise a `ValueError` with an appropriate message. - - code: |- - def main(num: int) -> float: - return 3 / num - error: division by zero - lang: python3 - template_prompt: |- - Here's my python3 code: - ```python - {code} - ``` - - You have to write a function in python called "main". Specify the parameter types. Do not call the main function. You should generally return the result. - The "main" function cannot be async. If you need to use async code, you can use the asyncio library. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (has to be IN LOEWRCASE). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - I get the following error: {error} - Fix my code. - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You fix the code shared by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Explain the error and the fix after generating the code inside an tag. - Also put explanations directly in the code as comments. - Return the complete fixed code. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - {explanation} - type: fix -- answer: |- - ```python - def main(num: int) -> float: - # This function takes an integer 'num' as input and returns the result of dividing 'num' by 16. - return num / 16 - ``` - code: |- - def main(num: int) -> float: - return num / 16 - description: comment my code - lang: python3 - template_prompt: |- - Here's my python3 code: - ```python - {code} - ``` - - You have to write a function in python called "main". Specify the parameter types. Do not call the main function. You should generally return the result. - The "main" function cannot be async. If you need to use async code, you can use the asyncio library. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (has to be IN LOEWRCASE). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You modify code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - Return the complete modified code. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: edit -- answer: |- - ```go - package inner - - import ( - "errors" - ) - - // main function divides a number by 16 and returns the result and an error if any - func main(number float64) (float64, error) { - if number == 0 { - return 0, errors.New("division by zero is not allowed") - } - result := number / 16 - return result, nil - } - ``` - description: divide a number by 16 - lang: go - template_prompt: |- - Here's my go code: - ```go - {code} - ``` - - You have to write go code and export a "main" function. Import the packages you need. The return type of the function has to be ({return_type}, error). The file package has to be "inner" - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```typescript - // Importing the 'number-to-words' npm package to convert numbers to words - import { toWords } from "npm:number-to-words"; - - // Define the main function with the appropriate parameter types - export async function main(number: number): Promise { - // Convert the number to words and return the result - return toWords(number); - } - ``` - description: convert a number to a word - lang: deno - template_prompt: |- - - You have to write TypeScript code and export a "main" function like this: "export async function main(...)" and specify the parameter types but do not call it. You should generally return the result. - You can import deno libraries or you can also import npm libraries like that: "import ... from "npm:{package}";". The fetch standard method is available globally. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (no resource suffix). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```typescript - import { Client } from "npm:pg"; - - type Postgresql = { - host: string, - port: number, - user: string, - dbname: string, - sslmode: string, - password: string - }; - - export async function main(postgresql: Postgresql) { - const client = new Client({ - host: postgresql.host, - port: postgresql.port, - user: postgresql.user, - database: postgresql.dbname, - password: postgresql.password, - ssl: { rejectUnauthorized: postgresql.sslmode === "require" } - }); - - await client.connect(); - - try { - const res = await client.query('SELECT * FROM orders'); - return res.rows; - } finally { - await client.end(); - } - } - ``` - description: connect to postgres and list the rows in the orders table - lang: deno - template_prompt: |- - - You have to write TypeScript code and export a "main" function like this: "export async function main(...)" and specify the parameter types but do not call it. You should generally return the result. - You can import deno libraries or you can also import npm libraries like that: "import ... from "npm:{package}";". The fetch standard method is available globally. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (no resource suffix). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```typescript - // No resources are needed for this function - - export async function main(number: number): Promise { - const units = ["", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"]; - const teens = ["Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"]; - const tens = ["", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"]; - const thousands = ["", "Thousand", "Million", "Billion"]; - - if (number === 0) return "Zero"; - - let word = ""; - let thousandCounter = 0; - - while (number > 0) { - if (number % 1000 !== 0) { - word = convertHundreds(number % 1000) + thousands[thousandCounter] + " " + word; - } - number = Math.floor(number / 1000); - thousandCounter++; - } - - return word.trim(); - - function convertHundreds(num: number): string { - let result = ""; - if (num > 99) { - result += units[Math.floor(num / 100)] + " Hundred "; - num %= 100; - } - if (num > 19) { - result += tens[Math.floor(num / 10)] + " "; - num %= 10; - } - if (num > 9) { - result += teens[num - 10] + " "; - } else if (num > 0) { - result += units[num] + " "; - } - return result; - } - } - ``` - description: convert a number to a word - lang: bun - template_prompt: |- - - You have to write TypeScript code and export a "main" function like this: "export async function main(...)" and specify the parameter types but do not call it. You should generally return the result. - The fetch standard method is available globally. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (no resource suffix). If the type name conflicts with any imported methods, you have to rename the imported method with the conflicting name. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- $1 role - -- $2 email - -- $3 disabled = false - -- $4 is_admin = false - -- $5 operator = false - -- $6 username - -- $7 workspace_id - - INSERT INTO usr (role, email, disabled, is_admin, operator, username, created_at, workspace_id) - VALUES ($1::varchar, $2::varchar, $3::bool, $4::bool, $5::bool, $6::varchar, now(), $7::varchar); - ``` - description: insert an a new user - lang: postgresql - template_prompt: |- - - You have to write a statement for PostgreSQL. Arguments can be obtained directly in the statement with `$1::{type}`, `$2::{type}`, etc... Name the parameters (without specifying the type) by adding comments before the statement like that: `-- $1 name1` or `-- $2 name = default` (one per row) - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- ? email (VARCHAR) - -- ? name (VARCHAR) - INSERT INTO users (email, name) VALUES (?, ?); - ``` - description: insert an email and a name in the users table - lang: mysql - template_prompt: |- - - You have to write a statement for MySQL. Arguments can be obtained directly in the statement with ?. Name the parameters by adding comments before the statement like that: `-- ? name1 ({type})` or `-- ? name2 ({type}) = default` (one per row) - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- @email (STRING) - -- @name (STRING) - - INSERT INTO users (email, name) - VALUES (@email, @name); - ``` - description: insert an email and a name in the users table - lang: bigquery - template_prompt: |- - - You have to write a statement for BigQuery. You can define arguments by adding comments before the statement like that: `-- @name1 ({type})` or `-- @name2 ({type}) = default` (one per row). They can then be obtained directly in the statement with `@name1`, `@name2`, etc.... - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- ? email (STRING) - -- ? name (STRING) - INSERT INTO users (email, name) VALUES (?, ?); - ``` - description: insert an email and a name in the users table - lang: snowflake - template_prompt: |- - - You have to write a statement for Snowflake. Arguments can be obtained directly in the statement with ?. Name the parameters by adding comments before the statement like that: `-- ? name1 ({type})` or `-- ? name2 ({type}) = default` (one per row) - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```graphql - mutation CreateUser($email: String!, $name: String!) { - createUser(email: $email, name: $name) { - id - email - name - } - } - ``` - description: create a new user with an email and a name - lang: graphql - template_prompt: |- - - You have to write a query for GraphQL. Add the needed arguments as query parameters. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```bash - # Get the first argument - var1="$1" - - # Divide the number by 16 - result=$((var1 / 16)) - - # Print the result - echo "$result" - ``` - description: divide a number by 16 - lang: bash - template_prompt: |- - - You have to write bash code. Do not include "#!/bin/bash". Arguments are always string and can only be obtained with "var1="$1"", "var2="$2"", etc... You do not need to check if the arguments are present. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```powershell - param( - [int]$Number # Define the parameter to accept an integer input - ) - - # Divide the number by 16 and store the result - $Result = $Number / 16 - - # Output the result - $Result - ``` - description: divide a number by 16 - lang: powershell - template_prompt: |- - - You have to write Powershell code. Arguments can be obtained by calling the param function on the first line like that: `param($ParamName1, $ParamName2 = "default value", [{type}]$ParamName3, ...)` - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```bash - # Get the arguments - app_name="$1" - python_version="$2" - - # Create a Dockerfile - cat < Dockerfile - # Use the specified Python version as the base image - FROM python:$python_version - - # Set the working directory in the container - WORKDIR /usr/src/app - - # Copy the current directory contents into the container at /usr/src/app - COPY . . - - # Install any needed packages specified in requirements.txt - RUN pip install --no-cache-dir -r requirements.txt - - # Make port 80 available to the world outside this container - EXPOSE 80 - - # Define environment variable - ENV NAME $app_name - - # Run app.py when the container launches - CMD ["python", "app.py"] - EOF - ``` - description: write a docker image for a python app - lang: bash - template_prompt: |- - - You have to write bash code. Do not include "#!/bin/bash". Arguments are always string and can only be obtained with "var1="$1"", "var2="$2"", etc... You do not need to check if the arguments are present. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```typescript - // Define the type for the Github resource - type Github = { - token: string - }; - - // Define the main function - export async function main(github: Github, owner: string, repo: string): Promise { - const url = `https://api.github.com/repos/${owner}/${repo}`; - - const response = await fetch(url, { - headers: { - 'Authorization': `token ${github.token}`, - 'Accept': 'application/vnd.github.v3+json' - } - }); - - if (!response.ok) { - throw new Error(`Error fetching repository data: ${response.statusText}`); - } - - const data = await response.json(); - return data.stargazers_count; - } - ``` - description: query the github api and return the number of stars of a repo - lang: nativets - template_prompt: |- - - You have to write TypeScript code and export a "main" function like this: "export async function main(...)" and specify the parameter types but do not call it. You should generally return the result. - You should use fetch and are not allowed to import any libraries. - You can take as parameters resources which are dictionaries containing credentials or configuration information. For Windmill to correctly detect the resources to be passed, the resource type name has to be exactly as specified in the following list: - - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - The resource type name has to be exactly as specified (no resource suffix). - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```javascript - // Set the value of the input with id 'my_field' to the context variable email - document.getElementById('my_field').value = ctx.email; - ``` - description: set the value of the input with id 'my_field' to the context variable - email - lang: frontend - template_prompt: |- - Write client-side javascript code that should {description}. - - - You can access the context object with the ctx global variable. - The app state is a store that can be used to store data. You can access and update the state object with the state global variable like this: state.foo = 'bar' - You can use the goto function to navigate to a specific URL: goto(path: string, newTab?: boolean) - You can use the openModal and closeModal functions to open and close a modal: openModal(id: string), closeModal(id: string) - You can use the setTab function to manually set the tab of a Tab component: setTab(id: string, index: string) - You can use the recompute function to recompute a component: recompute(id: string) - You can use the getAgGrid function to get the ag-grid instance of a table: getAgGrid(id: string) - You can use the setSelectedIndex function to select a row in a table or an AG Grid table: setSelectedIndex(id: string, index: number) - The setValue function is meant to set or force the value of a component: setValue(id: string, value: any) - You can validate a specific field of a form: validate(id: string, key: string) - You can validate all fields of a form: validateAll(id: string, key: string) - You can invalidate a specific field of a form: invalidate(id: string, key: string, error: string) - - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- $1 username - SELECT AVG(job_count) AS average_jobs_per_month - FROM ( - SELECT DATE_TRUNC('month', created_at) AS month, COUNT(*) AS job_count - FROM completed_job - WHERE created_by = $1::varchar - GROUP BY month - ) AS monthly_jobs; - ``` - description: compute the average number of completed jobs per month for the given - username - lang: postgresql - template_prompt: |- - - You have to write a statement for PostgreSQL. Arguments can be obtained directly in the statement with `$1::{type}`, `$2::{type}`, etc... Name the parameters (without specifying the type) by adding comments before the statement like that: `-- $1 name1` or `-- $2 name = default` (one per row) - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen -- answer: |- - ```sql - -- $1 owner - SELECT is_secret FROM variable WHERE owner = $1::varchar - ``` - - The error occurred because the column "is_secret" does not exist in the "account" table. According to the provided database schema, the "is_secret" column is in the "variable" table. The fixed code selects "is_secret" from the correct table and includes a parameter for filtering by the "owner" column. - - code: |- - SELECT is_secret FROM account - error: 'ExecutionError: db error: ERROR: column "is_secret" does not exist' - lang: postgresql - template_prompt: |- - Here's my PostgreSQL code: - ```sql - {code} - ``` - - Arguments can be obtained directly in the statement with `$1::{type}`, `$2::{type}`, etc... Name the parameters (without specifying the type) by adding comments before the statement like that: `-- $1 name1` or `-- $2 name = default` (one per row) - - I get the following error: {error} - Fix my code. - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You fix the code shared by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Explain the error and the fix after generating the code inside an tag. - Also put explanations directly in the code as comments. - Return the complete fixed code. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - {explanation} - type: fix -- answer: |- - ```php - token); - - $customers = \Stripe\Customer::all(); - - return $customers->data; - } - ``` - description: list all customers from stripe - lang: php - template_prompt: |- - - You have to write a function in php called "main". Specify the parameter types. Do not call the main function. You should generally return the result. The script must start with ` - {resourceTypes} - - You need to define the type of the resources that are needed before the main function, but only include them if they are actually needed to achieve the function purpose. - Before defining each type, check if the class already exists using class_exists. - The resource type name has to be exactly as specified. - If you need to import libraries, you need to specify them as comments in the following manner before the main function: - ``` - // require: - // mylibrary/mylibrary - // myotherlibrary/myotherlibrary@optionalversion - ``` - No need to require autoload, it is already done. - - My instructions: {description} - template_system: |- - You are a helpful coding assistant for Windmill, a developer platform for running scripts. You write code as instructed by the user. Each user message includes some contextual information which should guide your answer. - Only output code. Wrap the code in a code block. - Put explanations directly in the code as comments. - - Here's how interactions have to look like: - user: {sample_question} - assistant: ```language - {code} - ``` - type: gen diff --git a/llm/sample_queries.yaml b/llm/sample_queries.yaml deleted file mode 100644 index 054a0d3662..0000000000 --- a/llm/sample_queries.yaml +++ /dev/null @@ -1,69 +0,0 @@ -- lang: python3 - type: gen - description: connect to postgres and list the rows in the orders table -- lang: python3 - type: fix - code: |- - def main(num: int) -> float: - return 3 / num - error: division by zero -- lang: python3 - type: edit - code: |- - def main(num: int) -> float: - return num / 16 - description: comment my code -- lang: go - type: gen - description: divide a number by 16 -- lang: deno - type: gen - description: convert a number to a word -- lang: deno - type: gen - description: connect to postgres and list the rows in the orders table -- lang: bun - type: gen - description: convert a number to a word -- lang: postgresql - type: gen - description: insert an a new user -- lang: mysql - type: gen - description: insert an email and a name in the users table -- lang: bigquery - type: gen - description: insert an email and a name in the users table -- lang: snowflake - type: gen - description: insert an email and a name in the users table -- lang: graphql - type: gen - description: create a new user with an email and a name -- lang: bash - type: gen - description: divide a number by 16 -- lang: powershell - type: gen - description: divide a number by 16 -- lang: bash - type: gen - description: write a docker image for a python app -- lang: nativets - type: gen - description: query the github api and return the number of stars of a repo -- lang: frontend - type: gen - description: set the value of the input with id 'my_field' to the context variable email -- lang: postgresql - type: gen - description: compute the average number of completed jobs per month for the given username -- lang: postgresql - type: fix - code: |- - SELECT is_secret FROM account - error: |- - ExecutionError: db error: ERROR: column "is_secret" does not exist -- lang: php - type: gen - description: list all customers from stripe diff --git a/llm/src/__init__.py b/llm/src/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/llm/src/gen_samples.py b/llm/src/gen_samples.py deleted file mode 100644 index 90fb729f1b..0000000000 --- a/llm/src/gen_samples.py +++ /dev/null @@ -1,162 +0,0 @@ -import argparse -import yaml -from dotenv import load_dotenv -from tqdm import tqdm -from test_data import RESOURCE_TYPES, DB_SCHEMA - -load_dotenv() - -import openai - -import re - - -from typing import TypedDict, Tuple - - -class Literal(str): - pass - - -def literal_presenter(dumper, data): - return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|") - - -yaml.add_representer(Literal, literal_presenter) - - -class Prompt(TypedDict): - prompt: str - - -class PromptsConfig(TypedDict): - prompts: dict[str, Prompt] - system: str - - -class Query(TypedDict): - description: str - type: str - lang: str - code: str - error: str - - -def get_prompts( - prompts_path: str, -) -> Tuple[PromptsConfig, PromptsConfig, PromptsConfig]: - GEN_CONFIG = None - EDIT_CONFIG = None - FIX_CONFIG = None - with open(prompts_path + "/gen.yaml") as f: - GEN_CONFIG = yaml.safe_load(f) - with open(prompts_path + "/edit.yaml") as f: - EDIT_CONFIG = yaml.safe_load(f) - with open(prompts_path + "/fix.yaml") as f: - FIX_CONFIG = yaml.safe_load(f) - return GEN_CONFIG, EDIT_CONFIG, FIX_CONFIG - - -def get_queries(queries_path: str) -> list[Query]: - with open(queries_path) as f: - return yaml.safe_load(f) - - -def prepare_prompt( - query: Query, - GEN_CONFIG: PromptsConfig, - EDIT_CONFIG: PromptsConfig, - FIX_CONFIG: PromptsConfig, -): - system = "" - prompt = "" - template_prompt = "" - if query["type"] == "gen": - system = GEN_CONFIG["system"] - template_prompt = GEN_CONFIG["prompts"][query["lang"]]["prompt"] - prompt = template_prompt.replace("{description}", query["description"]) - elif query["type"] == "edit": - system = EDIT_CONFIG["system"] - template_prompt = EDIT_CONFIG["prompts"][query["lang"]]["prompt"] - prompt = template_prompt.replace("{description}", query["description"]).replace( - "{code}", query["code"] - ) - elif query["type"] == "fix": - system = FIX_CONFIG["system"] - template_prompt = FIX_CONFIG["prompts"][query["lang"]]["prompt"] - prompt = template_prompt.replace("{error}", query["error"]).replace( - "{code}", query["code"] - ) - - if query["lang"] in ["deno", "bun", "nativets"]: - prompt = prompt.replace("{resourceTypes}", RESOURCE_TYPES["typescript"]) - elif query["lang"] == "python3": - prompt = prompt.replace("{resourceTypes}", RESOURCE_TYPES["python"]) - elif query["lang"] == "php": - prompt = prompt.replace("{resourceTypes}", RESOURCE_TYPES["php"]) - - if query["lang"] in ["postgresql"]: - prompt = ( - prompt - + "\nHere's the database schema, each column is in the format [name, type, required, default?]: \n" - + DB_SCHEMA - + "\n" - ) - - return system, prompt, template_prompt - - -def format_literal(answer: str): - return re.sub("[^\\S\n]+\n", "\n", answer).replace("\t", " ") - - -def gen_samples(queries_path: str, answers_path: str, prompts_path: str): - GEN_CONFIG, EDIT_CONFIG, FIX_CONFIG = get_prompts(prompts_path) - - queries = get_queries(queries_path) - - answers = [] - - for query in tqdm(queries): - (system, prompt, template_prompt) = prepare_prompt( - query, GEN_CONFIG, EDIT_CONFIG, FIX_CONFIG - ) - client = openai.OpenAI() - chat_completion = client.chat.completions.create( - model="gpt-4o-2024-05-13", - messages=[ - {"role": "system", "content": system}, - {"role": "user", "content": prompt}, - ], - temperature=0, - max_tokens=2048, - seed=42, - ) - - answer = { - **query, - "answer": Literal(format_literal(chat_completion.choices[0].message.content)), # type: ignore - "template_system": Literal(format_literal(system)), - "template_prompt": Literal(format_literal(template_prompt)), - } - - if "code" in query: - answer["code"] = Literal(format_literal(query["code"])) - - answers.append(answer) - - with open(answers_path, "w") as f: - yaml.dump(answers, f) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Process some integers.") - parser.add_argument("--queries_path", type=str, default="./sample_queries.yaml") - parser.add_argument("--answers_path", type=str, default="./sample_answers.yaml") - parser.add_argument( - "--prompts_path", - type=str, - default="../frontend/src/lib/components/copilot/prompts", - ) - args = parser.parse_args() - gen_samples(args.queries_path, args.answers_path, args.prompts_path) diff --git a/llm/src/test_data.py b/llm/src/test_data.py deleted file mode 100644 index 8631aa2c80..0000000000 --- a/llm/src/test_data.py +++ /dev/null @@ -1,510 +0,0 @@ -RESOURCE_TYPES = { - "typescript": """type Airtable = { - apiKey: string -} - -type AirtableTable = { - baseId: string, - tableName: string -} - -type Appwrite = { - key: string, - project: string, - endpoint: string, - self_signed: boolean -} - -type Aws = { - region: string, - awsAccessKeyId: string, - awsSecretAccessKey: string -} - -type Azure = { - azureClientId: string, - azureTenantId: string, - azureClientSecret: string -} - -type Clickhouse = { - host: string, - password: string, - username: string -} - -type CMyResourceType = { - name: string -} - -type CSolarFlar = { - a: number, - b: number, - c: boolean, - d: string, - e: any, - f: any[], - g: any, - h: any -} - -type Datadog = { - apiKey: string, - appKey: string, - apiBase: string -} - -type DiscordBotConfiguration = { - public_key: string, - application_id: string -} - -type DiscordWebhook = { - webhook_url: string -} - -type Dynatrace = { - accessToken: string, - environmentId: string, - environmentUrl: string -} - -type Faunadb = { - region: string, - secret: string -} - -type Firebase = { - appId: string, - apiKey: string, - projectId: string, - authDomain: string, - measurementId: string, - storageBucket: string, - messagingSenderId: string -} - -type Funkwhale = { - token: string, - baseUrl: string -} - -type Gcal = { - token: string -} - -type GcpServiceAccount = { - type: string, - auth_uri: string, - client_id: string, - token_uri: string, - project_id: string, - private_key: string, - client_email: string, - private_key_id: string, - client_x509_cert_url: string, - auth_provider_x509_cert_url: string -} - -type Gdrive = { - token: string -} - -type Github = { - token: string -} - -type Gitlab = { - token: string, - baseUrl: string -} - -type Gmail = { - token: string -} - -type Gsheets = { - token: string -} - -type Hubspot = { - token: string -} - -type Ipinfo = { - token: string -} - -type Linkding = { - token: string, - baseUrl: string -} - -type Linkedin = { - token: string -} - -type Mailchimp = { - server: string, - api_key: string -} - -type Mailgun = { - api_key: string -} - -type Mastodon = { - token: string, - baseUrl: string -} - -type Matrix = { - token: string, - baseUrl: string -} - -type Mongodb = { - db: string, - tls: boolean, - servers: any, - credential: any -} - -type MongodbRest = { - api_key: string, - endpoint: string -} - -type Mysql = { - host: string, - port: number, - user: string, - database: string, - password: string -} - -type Nocodb = { - table: string, - apiUrl: string, - xc_token: string, - workspace: string -} - -type Notion = { - token: string -} - -type Openai = { - api_key: string, - organization_id: string -} - -type Pinecone = { - apiKey: string, - environment: string -} - -type Postgresql = { - host: string, - port: number, - user: string, - dbname: string, - sslmode: string, - password: string -} - -type Rss = { - url: string -} - -type S3 = { - port: number, - bucket: string, - region: string, - useSSL: boolean, - endPoint: string, - accessKey: string, - pathStyle: boolean, - secretKey: string -} - -type Sendgrid = { - token: string -} - -type Slack = { - token: string -} - -type Smtp = { - host: string, - port: number, - user: string, - password: string -} - -type Square = { - token: string -} - -type Stripe = { - token: string -} - -type Supabase = { - key: string, - url: string -} - -type Surrealdb = { - url: string, - token: string -} - -type Telegram = { - token: string -} - -type Toggl = { - token: string -} -""", - "python": """class airtable(TypedDict): - apiKey: str - -class airtable_table(TypedDict): - baseId: str - tableName: str - -class appwrite(TypedDict): - key: str - project: str - endpoint: str - self_signed: bool - -class aws(TypedDict): - region: str - awsAccessKeyId: str - awsSecretAccessKey: str - -class azure(TypedDict): - azureClientId: str - azureTenantId: str - azureClientSecret: str - -class clickhouse(TypedDict): - host: str - password: str - username: str - -class c_my_resource_type(TypedDict): - name: str - -class c_solar_flar(TypedDict): - a: int - b: float - c: bool - d: str - e: dict - f: list - g: dict - h: dict - -class datadog(TypedDict): - apiKey: str - appKey: str - apiBase: str - -class discord_bot_configuration(TypedDict): - public_key: str - application_id: str - -class discord_webhook(TypedDict): - webhook_url: str - -class dynatrace(TypedDict): - accessToken: str - environmentId: str - environmentUrl: str - -class faunadb(TypedDict): - region: str - secret: str - -class firebase(TypedDict): - appId: str - apiKey: str - projectId: str - authDomain: str - measurementId: str - storageBucket: str - messagingSenderId: str - -class funkwhale(TypedDict): - token: str - baseUrl: str - -class gcal(TypedDict): - token: str - -class gcp_service_account(TypedDict): - type: str - auth_uri: str - client_id: str - token_uri: str - project_id: str - private_key: str - client_email: str - private_key_id: str - client_x509_cert_url: str - auth_provider_x509_cert_url: str - -class gdrive(TypedDict): - token: str - -class github(TypedDict): - token: str - -class gitlab(TypedDict): - token: str - baseUrl: str - -class gmail(TypedDict): - token: str - -class gsheets(TypedDict): - token: str - -class hubspot(TypedDict): - token: str - -class ipinfo(TypedDict): - token: str - -class linkding(TypedDict): - token: str - baseUrl: str - -class linkedin(TypedDict): - token: str - -class mailchimp(TypedDict): - server: str - api_key: str - -class mailgun(TypedDict): - api_key: str - -class mastodon(TypedDict): - token: str - baseUrl: str - -class matrix(TypedDict): - token: str - baseUrl: str - -class mongodb(TypedDict): - db: str - tls: bool - servers: dict - credential: dict - -class mongodb_rest(TypedDict): - api_key: str - endpoint: str - -class mysql(TypedDict): - host: str - port: float - user: str - database: str - password: str - -class nocodb(TypedDict): - table: str - apiUrl: str - xc_token: str - workspace: str - -class notion(TypedDict): - token: str - -class openai(TypedDict): - api_key: str - organization_id: str - -class pinecone(TypedDict): - apiKey: str - environment: str - -class postgresql(TypedDict): - host: str - port: int - user: str - dbname: str - sslmode: str - password: str - -class rss(TypedDict): - url: str - -class s3(TypedDict): - port: float - bucket: str - region: str - useSSL: bool - endPoint: str - accessKey: str - pathStyle: bool - secretKey: str - -class sendgrid(TypedDict): - token: str - -class slack(TypedDict): - token: str - -class smtp(TypedDict): - host: str - port: int - user: str - password: str - -class square(TypedDict): - token: str - -class stripe(TypedDict): - token: str - -class supabase(TypedDict): - key: str - url: str - -class surrealdb(TypedDict): - url: str - token: str - -class telegram(TypedDict): - token: str - -class toggl(TypedDict): - token: str -""", - "php": """class Stripe { - public string $token; -} - -class Bitbucket { - public string $password; - public string $username; -} - -class Trello { - public string $key; - public string $token; -} -""", -} - - -DB_SCHEMA = """{"app":[["id","int8",true,"nextval('app_id_seq'::regclass)"],["path","varchar",true],["policy","jsonb",true],["summary","varchar",true,"''::character varying"],["versions","_int8",true],["draft_only","bool",false],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true]],"usr":[["role","varchar",false],["email","varchar",true],["disabled","bool",true,"false"],["is_admin","bool",true,"false"],["operator","bool",true,"false"],["username","varchar",true],["created_at","timestamptz",true,"now()"],["workspace_id","varchar",true]],"flow":[["path","varchar",true],["value","jsonb",true],["schema","json",false],["summary","text",true],["archived","bool",true,"false"],["edited_at","timestamptz",true,"now()"],["edited_by","varchar",true],["draft_only","bool",false],["description","text",true],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true],["dependency_job","uuid",false]],"audit":[["id","int4",true,"nextval('audit_id_seq'::regclass)"],["resource","varchar",false],["username","varchar",true],["operation","varchar",true],["timestamp","timestamptz",true,"now()"],["parameters","jsonb",false],["action_kind","action_kind",true],["workspace_id","varchar",true]],"draft":[["typ","draft_type",true],["path","varchar",true],["value","json",true],["created_at","timestamp",true,"now()"],["workspace_id","varchar",true]],"input":[["id","uuid",true],["args","jsonb",true],["name","text",true],["is_public","bool",true,"false"],["created_at","timestamptz",true,"now()"],["created_by","varchar",true],["runnable_id","varchar",true],["workspace_id","varchar",true],["runnable_type","runnable_type",true]],"queue":[["id","uuid",true],["tag","varchar",true,"'other'::character varying"],["args","jsonb",false],["logs","text",false],["email","varchar",true,"'missing@email.xyz'::character varying"],["env_id","int4",false],["running","bool",true,"false"],["suspend","int4",true,"0"],["canceled","bool",true,"false"],["job_kind","job_kind",true,"'script'::job_kind"],["language","script_lang",false,"'python3'::script_lang"],["mem_peak","int4",false],["raw_code","text",false],["raw_flow","jsonb",false],["raw_lock","text",false],["root_job","uuid",false],["last_ping","timestamptz",true,"now()"],["leaf_jobs","jsonb",false],["created_at","timestamptz",true,"now()"],["created_by","varchar",true],["parent_job","uuid",false],["started_at","timestamptz",false],["canceled_by","varchar",false],["flow_status","jsonb",false],["same_worker","bool",false,"false"],["script_hash","int8",false],["script_path","varchar",false],["is_flow_step","bool",false,"false"],["workspace_id","varchar",true],["pre_run_error","text",false],["schedule_path","varchar",false],["scheduled_for","timestamptz",true],["suspend_until","timestamptz",false],["canceled_reason","text",false],["permissioned_as","varchar",true,"'g/all'::character varying"],["concurrent_limit","int4",false],["visible_to_owner","bool",false,"true"],["concurrency_time_window_s","int4",false]],"token":[["email","varchar",false],["label","varchar",false],["owner","varchar",false],["token","varchar",true],["scopes","_text",false],["created_at","timestamptz",true,"now()"],["expiration","timestamptz",false],["super_admin","bool",true,"false"],["last_used_at","timestamptz",true,"now()"],["workspace_id","varchar",false]],"usage":[["id","varchar",true],["usage","int4",true],["month_","int4",true],["is_workspace","bool",true]],"folder":[["name","varchar",true],["owners","_varchar",true],["extra_perms","jsonb",true,"'{}'::jsonb"],["display_name","varchar",true],["workspace_id","varchar",true]],"group_":[["name","varchar",true],["summary","text",false],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true]],"script":[["tag","varchar",false],["envs","_varchar",false],["hash","int8",true],["kind","script_kind",true,"'script'::script_kind"],["lock","text",false],["path","varchar",true],["schema","json",false],["content","text",true],["deleted","bool",true,"false"],["summary","text",true],["archived","bool",true,"false"],["language","script_lang",true,"'python3'::script_lang"],["created_at","timestamptz",true,"now()"],["created_by","varchar",true],["draft_only","bool",false],["description","text",true],["extra_perms","jsonb",true,"'{}'::jsonb"],["is_template","bool",false,"false"],["workspace_id","varchar",true],["parent_hashes","_int8",false],["lock_error_logs","text",false],["concurrent_limit","int4",false],["concurrency_time_window_s","int4",false]],"account":[["id","int4",true,"nextval('account_id_seq'::regclass)"],["owner","varchar",true],["client","varchar",true],["expires_at","timestamptz",true],["workspace_id","varchar",true],["refresh_error","text",false],["refresh_token","varchar",true]],"capture":[["path","varchar",true],["payload","jsonb",true,"'null'::jsonb"],["created_at","timestamptz",true,"now()"],["created_by","varchar",true],["workspace_id","varchar",true]],"raw_app":[["data","text",true],["path","varchar",true],["summary","varchar",true,"''::character varying"],["version","int4",true,"0"],["edited_at","timestamptz",true,"now()"],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true]],"favorite":[["usr","varchar",true],["path","varchar",true],["workspace_id","varchar",true],["favorite_kind","favorite_kind",true]],"password":[["name","varchar",false],["email","varchar",true],["company","varchar",false],["verified","bool",true,"false"],["login_type","varchar",true],["super_admin","bool",true,"false"],["password_hash","varchar",false],["first_time_user","bool",true,"false"]],"resource":[["path","varchar",true],["value","jsonb",false],["description","text",false],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true],["resource_type","varchar",true]],"schedule":[["args","jsonb",false],["path","varchar",true],["email","varchar",true,"'missing@email.xyz'::character varying"],["error","text",false],["enabled","bool",true,"true"],["is_flow","bool",true,"false"],["schedule","varchar",true],["timezone","varchar",true,"'UTC'::character varying"],["edited_at","timestamptz",true,"now()"],["edited_by","varchar",true],["on_failure","varchar",false,"NULL::character varying"],["extra_perms","jsonb",true,"'{}'::jsonb"],["script_path","varchar",true],["workspace_id","varchar",true]],"variable":[["path","varchar",true],["value","varchar",true],["account","int4",false],["is_oauth","bool",true,"false"],["is_secret","bool",true,"false"],["description","varchar",true,"''::character varying"],["extra_perms","jsonb",true,"'{}'::jsonb"],["workspace_id","varchar",true]],"workspace":[["id","varchar",true],["name","varchar",true],["owner","varchar",true],["deleted","bool",true,"false"],["premium","bool",true,"false"]],"magic_link":[["email","varchar",true],["token","varchar",true],["expiration","timestamptz",true,"(now() + '1 day'::interval)"]],"resume_job":[["id","uuid",true],["job","uuid",true],["flow","uuid",true],["value","jsonb",true,"'null'::jsonb"],["approver","varchar",false],["resume_id","int4",true,"0"],["created_at","timestamptz",true,"now()"]],"app_version":[["id","int8",true,"nextval('app_version_id_seq'::regclass)"],["value","json",true],["app_id","int8",true],["created_at","timestamptz",true,"now()"],["created_by","varchar",true]],"worker_ping":[["ip","varchar",true,"'NO IP'::character varying"],["worker","varchar",true],["ping_at","timestamptz",true,"now()"],["started_at","timestamptz",true,"now()"],["jobs_executed","int4",true,"0"],["worker_instance","varchar",true]],"usr_to_group":[["usr","varchar",true,"'ruben'::character varying"],["group_","varchar",true],["workspace_id","varchar",true]],"completed_job":[["id","uuid",true],["tag","varchar",true,"'other'::character varying"],["args","jsonb",false],["logs","text",false],["email","varchar",true,"'missing@email.xyz'::character varying"],["env_id","int4",true,"0"],["result","jsonb",false],["deleted","bool",true,"false"],["success","bool",true],["canceled","bool",true,"false"],["job_kind","job_kind",true,"'script'::job_kind"],["language","script_lang",false,"'python3'::script_lang"],["mem_peak","int4",false],["raw_code","text",false],["raw_flow","jsonb",false],["raw_lock","text",false],["created_at","timestamptz",true],["created_by","varchar",true],["is_skipped","bool",true,"false"],["parent_job","uuid",false],["started_at","timestamptz",true,"now()"],["canceled_by","varchar",false],["duration_ms","int4",true],["flow_status","jsonb",false],["script_hash","int8",false],["script_path","varchar",false],["is_flow_step","bool",false,"false"],["workspace_id","varchar",true],["schedule_path","varchar",false],["canceled_reason","text",false],["permissioned_as","varchar",true,"'g/all'::character varying"],["visible_to_owner","bool",false,"true"]],"resource_type":[["name","varchar",true],["schema","jsonb",false],["description","text",false],["workspace_id","varchar",true]],"workspace_key":[["key","varchar",true,"'changeme'::character varying"],["kind","workspace_key_kind",true],["workspace_id","varchar",true]],"_sqlx_migrations":[["success","bool",true],["version","int8",true],["checksum","bytea",true],["description","text",true],["installed_on","timestamptz",true,"now()"],["execution_time","int8",true]],"workspace_invite":[["email","varchar",true],["is_admin","bool",true,"false"],["operator","bool",true,"false"],["workspace_id","varchar",true]],"workspace_settings":[["plan","varchar",false],["webhook","text",false],["deploy_to","varchar",false],["slack_name","varchar",false],["customer_id","varchar",false],["slack_email","varchar",true,"'missing@email.xyz'::character varying"],["workspace_id","varchar",true],["error_handler","varchar",false],["slack_team_id","varchar",false],["auto_invite_domain","varchar",false],["auto_invite_operator","bool",false,"false"],["openai_resource_path","varchar",false],["slack_command_script","varchar",false]],"pip_resolution_cache":[["hash","varchar",true],["lockfile","text",true],["expiration","timestamp",true]],"databases":[["db_name","text",true],["test_path","text",true],["created_at","timestamptz",true,"now()"]]}""" diff --git a/llm/version.txt b/llm/version.txt deleted file mode 100644 index e90bfef7ab..0000000000 --- a/llm/version.txt +++ /dev/null @@ -1 +0,0 @@ -3.10.4 \ No newline at end of file