mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-24 05:24:23 +00:00
feat: add AI chat and summarize endpoints with database integration
- Implemented a new chat endpoint that utilizes Groq for chat completions based on news articles. - Added a summarize endpoint that fetches news articles from the database and generates summaries using Groq. - Introduced a new package "@vueuse/core" for improved reactivity. - Created a comprehensive command UI component with various subcomponents for better user interaction. - Developed a scraping module using Scrapy to fetch news articles from Google News. - Added validation and sanitization for slug parameters in the fetch article endpoint.
This commit is contained in:
parent
92a0358744
commit
bf357f1c84
35 changed files with 809 additions and 11 deletions
25
components/ui/command/index.ts
Normal file
25
components/ui/command/index.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import type { Ref } from 'vue'
|
||||
import { createContext } from 'reka-ui'
|
||||
|
||||
export { default as Command } from './Command.vue'
|
||||
export { default as CommandDialog } from './CommandDialog.vue'
|
||||
export { default as CommandEmpty } from './CommandEmpty.vue'
|
||||
export { default as CommandGroup } from './CommandGroup.vue'
|
||||
export { default as CommandInput } from './CommandInput.vue'
|
||||
export { default as CommandItem } from './CommandItem.vue'
|
||||
export { default as CommandList } from './CommandList.vue'
|
||||
export { default as CommandSeparator } from './CommandSeparator.vue'
|
||||
export { default as CommandShortcut } from './CommandShortcut.vue'
|
||||
|
||||
export const [useCommand, provideCommandContext] = createContext<{
|
||||
allItems: Ref<Map<string, string>>
|
||||
allGroups: Ref<Map<string, Set<string>>>
|
||||
filterState: {
|
||||
search: string
|
||||
filtered: { count: number, items: Map<string, number>, groups: Set<string> }
|
||||
}
|
||||
}>('Command')
|
||||
|
||||
export const [useCommandGroup, provideCommandGroupContext] = createContext<{
|
||||
id?: string
|
||||
}>('CommandGroup')
|
Loading…
Add table
Add a link
Reference in a new issue