From ccb13309f76f30d99e557679769a0023778aa3e4 Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 30 Oct 2024 21:50:14 +0000 Subject: [PATCH 1/4] tool disabled by default --- src/components/Chat/ChatConfigComponents/exampleAgents.ts | 5 ++--- src/components/Chat/StartChat.tsx | 2 +- src/lib/llm/tools/tool-definitions.ts | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Chat/ChatConfigComponents/exampleAgents.ts b/src/components/Chat/ChatConfigComponents/exampleAgents.ts index 0bf94a64..22fe3759 100644 --- a/src/components/Chat/ChatConfigComponents/exampleAgents.ts +++ b/src/components/Chat/ChatConfigComponents/exampleAgents.ts @@ -1,5 +1,4 @@ import { AgentConfig, PromptTemplate } from '../../../lib/llm/types' -import { allAvailableToolDefinitions } from '../../../lib/llm/tools/tool-definitions' const defaultAgentPromptTemplate: PromptTemplate = [ { @@ -66,12 +65,12 @@ const exampleAgents: AgentConfig[] = [ files: [], name: 'Default', dbSearchFilters: { - limit: 20, + limit: 30, minDate: undefined, maxDate: undefined, passFullNoteIntoContext: true, }, - toolDefinitions: allAvailableToolDefinitions, + toolDefinitions: [], promptTemplate: defaultAgentPromptTemplate, }, // { diff --git a/src/components/Chat/StartChat.tsx b/src/components/Chat/StartChat.tsx index 6ef3a297..a56e5a18 100644 --- a/src/components/Chat/StartChat.tsx +++ b/src/components/Chat/StartChat.tsx @@ -197,7 +197,7 @@ const StartChat: React.FC = ({ defaultModelName, handleNewChatMe className="scale-75" /> diff --git a/src/lib/llm/tools/tool-definitions.ts b/src/lib/llm/tools/tool-definitions.ts index 16919ff8..517408ca 100644 --- a/src/lib/llm/tools/tool-definitions.ts +++ b/src/lib/llm/tools/tool-definitions.ts @@ -10,7 +10,7 @@ export const searchToolDefinition: ToolDefinition = { { name: 'query', type: 'string', - description: 'The query to search for', + description: 'The query to search for. To get the best results, this should be the full user query.', }, { name: 'limit', From 1f79693b2deb5be1c66794df80ba1dffe8e90ef7 Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 30 Oct 2024 21:54:10 +0000 Subject: [PATCH 2/4] mark tools as beta --- src/components/Chat/ChatConfigComponents/ToolSelector.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Chat/ChatConfigComponents/ToolSelector.tsx b/src/components/Chat/ChatConfigComponents/ToolSelector.tsx index c4aa7893..f7ac3de8 100644 --- a/src/components/Chat/ChatConfigComponents/ToolSelector.tsx +++ b/src/components/Chat/ChatConfigComponents/ToolSelector.tsx @@ -4,6 +4,7 @@ import { ToolDefinition } from '../../../lib/llm/types' import { Button } from '@/components/ui/button' import { cn } from '@/lib/ui' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' +import { Badge } from '@/components/ui/badge' interface ToolSelectorProps { allTools: ToolDefinition[] @@ -29,8 +30,11 @@ const ToolSelector: React.FC = ({ allTools, selectedTools, on className="w-full justify-between bg-background text-foreground" onClick={() => setIsOpen(!isOpen)} > - + Tools + + BETA + From 106fedbe3664529587a377ab623b087cf67a23b6 Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 30 Oct 2024 22:15:11 +0000 Subject: [PATCH 3/4] claude sonnet --- shared/defaultLLMs.ts | 4 ++-- .../Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/shared/defaultLLMs.ts b/shared/defaultLLMs.ts index 706fed10..3e9f62c7 100644 --- a/shared/defaultLLMs.ts +++ b/shared/defaultLLMs.ts @@ -29,12 +29,12 @@ export const openAIDefaultLLMs: LLMConfig[] = [ export const anthropicDefaultLLMs: LLMConfig[] = [ { contextLength: 180000, - modelName: 'claude-3-5-sonnet-20240620', + modelName: 'claude-3-5-sonnet-latest', apiName: anthropicDefaultAPIName, }, { contextLength: 180000, - modelName: 'claude-3-opus-20240229', + modelName: 'claude-3-opus-latest', apiName: anthropicDefaultAPIName, }, { diff --git a/src/components/Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx b/src/components/Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx index c351592c..07fe0f63 100644 --- a/src/components/Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx +++ b/src/components/Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx @@ -1,4 +1,5 @@ import React, { useState } from 'react' +import posthog from 'posthog-js' import { APIInterface, LLMAPIConfig } from 'electron/main/electron-store/storeConfig' import { anthropicDefaultAPIName, @@ -30,6 +31,10 @@ const DefaultLLMAPISetupModal: React.FC = ({ isOpen, on const handleSave = async () => { if (apiKey) { + posthog.capture('save_cloud_llm', { + provider: apiInterface, + }) + if (apiInterface === 'openai') { const api: LLMAPIConfig = { apiKey, From fe43a39bbbec6d7e923969cee5e911ebe7d1d1cc Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 30 Oct 2024 22:44:06 +0000 Subject: [PATCH 4/4] v bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3b42c17..593639fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reor-project", - "version": "0.2.25", + "version": "0.2.26", "productName": "Reor", "main": "dist-electron/main/index.js", "description": "An AI note-taking app that runs models locally.",