Skip to content

Commit

Permalink
next
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollingj committed Jul 22, 2024
1 parent 1d3dc34 commit 1aa13cb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
26 changes: 26 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -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"
17 changes: 16 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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");
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 1aa13cb

Please sign in to comment.