Merge pull request #800 from ArnoChenFx/misc
Fix: Correct component paths, add 'api' tab, and handle invalid num_turns
This commit is contained in:
@@ -657,6 +657,10 @@ def get_conversation_turns(
|
||||
Returns:
|
||||
Formatted string of the conversation history
|
||||
"""
|
||||
# Check if num_turns is valid
|
||||
if num_turns <= 0:
|
||||
return ""
|
||||
|
||||
# Group messages into turns
|
||||
turns: list[list[dict[str, Any]]] = []
|
||||
messages: list[dict[str, Any]] = []
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { useState, useCallback } from 'react'
|
||||
import ThemeProvider from '@/components/graph/ThemeProvider'
|
||||
import ThemeProvider from '@/components/ThemeProvider'
|
||||
import MessageAlert from '@/components/MessageAlert'
|
||||
import ApiKeyAlert from '@/components/ApiKeyAlert'
|
||||
import StatusIndicator from '@/components/graph/StatusIndicator'
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import Button from '@/components/ui/Button'
|
||||
import { SiteInfo } from '@/lib/constants'
|
||||
import ThemeToggle from '@/components/graph/ThemeToggle'
|
||||
import ThemeToggle from '@/components/ThemeToggle'
|
||||
import { TabsList, TabsTrigger } from '@/components/ui/Tabs'
|
||||
import { useSettingsStore } from '@/stores/settings'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { useContext } from 'react'
|
||||
import { ThemeProviderContext } from '@/components/graph/ThemeProvider'
|
||||
import { ThemeProviderContext } from '@/components/ThemeProvider'
|
||||
|
||||
const useTheme = () => {
|
||||
const context = useContext(ThemeProviderContext)
|
||||
|
@@ -5,7 +5,7 @@ import { defaultQueryLabel } from '@/lib/constants'
|
||||
import { Message, QueryRequest } from '@/api/lightrag'
|
||||
|
||||
type Theme = 'dark' | 'light' | 'system'
|
||||
type Tab = 'documents' | 'knowledge-graph' | 'retrieval'
|
||||
type Tab = 'documents' | 'knowledge-graph' | 'retrieval' | 'api'
|
||||
|
||||
interface SettingsState {
|
||||
theme: Theme
|
||||
|
Reference in New Issue
Block a user