Skip to content

Commit

Permalink
Merge pull request #468 from reorproject/drop-back-defaults
Browse files Browse the repository at this point in the history
tool disabled by default
  • Loading branch information
samlhuillier authored Oct 30, 2024
2 parents 01a0c52 + fe43a39 commit 00aab77
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
4 changes: 2 additions & 2 deletions shared/defaultLLMs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
Expand Down
6 changes: 5 additions & 1 deletion src/components/Chat/ChatConfigComponents/ToolSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand All @@ -29,8 +30,11 @@ const ToolSelector: React.FC<ToolSelectorProps> = ({ allTools, selectedTools, on
className="w-full justify-between bg-background text-foreground"
onClick={() => setIsOpen(!isOpen)}
>
<span className="flex items-center">
<span className="flex items-center gap-1.5">
Tools
<Badge variant="secondary" className="h-4 px-1 text-[10px] font-normal">
BETA
</Badge>
<TooltipProvider>
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
Expand Down
5 changes: 2 additions & 3 deletions src/components/Chat/ChatConfigComponents/exampleAgents.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { AgentConfig, PromptTemplate } from '../../../lib/llm/types'
import { allAvailableToolDefinitions } from '../../../lib/llm/tools/tool-definitions'

const defaultAgentPromptTemplate: PromptTemplate = [
{
Expand Down Expand Up @@ -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,
},
// {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Chat/StartChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const StartChat: React.FC<StartChatProps> = ({ defaultModelName, handleNewChatMe
className="scale-75"
/>
<Label htmlFor="db-search-toggle" className="ml-1 text-xs text-muted-foreground">
Make initial knowledge base search
Make knowledge base search
</Label>
</div>
<Drawer>
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -30,6 +31,10 @@ const DefaultLLMAPISetupModal: React.FC<CloudLLMSetupModalProps> = ({ isOpen, on

const handleSave = async () => {
if (apiKey) {
posthog.capture('save_cloud_llm', {
provider: apiInterface,
})

if (apiInterface === 'openai') {
const api: LLMAPIConfig = {
apiKey,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/llm/tools/tool-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 00aab77

Please sign in to comment.