diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..ff67e07 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Ask the user for the version number +echo "Enter the version number (e.g. 1.0.1):" +read version + +# Validate the input as a semver version number +if ! [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: Invalid version number format. Please use semver (e.g. 1.0.1)" + exit 1 +fi + +# Git add and commit +git add . +echo "Enter commit message:" +read commit_message +git commit -m "$commit_message" + +# Push to main branch +git push origin main + +# Create and push tag +git tag -a $version -m "$version" +git push origin $version + +echo "Deployment completed for version $version" diff --git a/main.ts b/main.ts index e8340ce..dfb77b1 100644 --- a/main.ts +++ b/main.ts @@ -34,7 +34,7 @@ import { CaretCanvas } from "./caret_canvas"; const parseString = require("xml2js").parseString; export const DEFAULT_SETTINGS: CaretPluginSettings = { - caret_version: "0.2.43", + caret_version: "0.2.44", chat_logs_folder: "caret/chats", chat_logs_date_format_bool: false, chat_logs_rename_bool: true, @@ -72,6 +72,13 @@ export const DEFAULT_SETTINGS: CaretPluginSettings = { vision: true, streaming: true, }, + "gpt-4o-mini": { + name: "gpt-4o-mini", + context_window: 128000, + function_calling: true, + vision: true, + streaming: true, + }, }, groq: { "llama3-8b-8192": { @@ -2104,6 +2111,9 @@ version: 1 const node_content = ``; let x = node.x + node.width + xOffset; let y = node.y + yOffset; + // This is needed to work with the iterations. We still need to return the first node from the iterations + // So linear workflows works + let firstNode = null; for (let i = 0; i < iterations; i++) { const new_node = await this.createChildNode(canvas, node, x, y, node_content, "right", "left"); @@ -2130,9 +2140,13 @@ version: 1 const content = await this.llm_call(provider, model, conversation); new_canvas_node.setText(content); } + if (i === 0) { + firstNode = new_canvas_node; + } y += yOffset + node.height; } + return firstNode; } async buildConversation(node: Node, nodes: Node[], edges: any[], system_prompt: string) { @@ -2491,6 +2505,7 @@ version: 1 stream: true, temperature: temperature, }; + console.log({ params }); try { const stream = await this.openai_client.chat.completions.create(params); return stream; diff --git a/manifest.json b/manifest.json index 01f11f7..1a33b3c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "caret", "name": "Caret", - "version": "0.2.43", + "version": "0.2.44", "minAppVersion": "1.5.12", "description": "Accelerate your work with LLMs in canvas and your notes", "author": "Jake Colling",