提交 cc2e67fd 编写于 作者: D DebugIsFalse

添加记录请求

上级 28634c20
<template> <template>
<ULink to="/search/123" class="flex flex-col group"> <ULink to="/search/123" class="flex flex-col group">
<div class="transition truncate group-hover:text-primary">Python有哪些新的库</div> <div class="transition truncate group-hover:text-primary">{{ item.title }}</div>
<div class="break-word text-balance line-clamp-2 font-sans text-base" :class="textColor"> <div class="break-word text-balance line-clamp-2 font-sans text-base" :class="textColor">
Python有许多新的库不断涌现,以下是一些值得关注的新库: {{ item.description || ' 待补充' }}
Anthropic - 由Anthropic公司开发的大型语言模型库,用于自然语言处理和生成任务。
Jax - 用于高性能数值计算的库,支持自动微分和GPU/TPU加速,适用于机器学习和科学计算。
FastAPI - 一个现代、快速的Web框架,用于构建API。它基于ASGI,支持异步编程。
Starlette - 一个轻量级的ASGI框架,可用于构建高性能的异步Web服务。
Polars - 一个快速的数据框架库,性能优于Pandas,支持延迟计算。
Altair - 一个基于Vega和Vega-Lite的声明式统计可视化库。
AnyIO - 提供异步并发抽象的库,支持多种异步库如asyncio、trio等。
Hypothesis - 一个基于属性的测试框架,可自动生成测试用例。
这些只是Python新兴库中的一小部分。Python生态系统一直在快速发展,新库层出不穷,为开发者提供更多选择。
</div> </div>
</ULink> </ULink>
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
...@@ -51,6 +41,12 @@ ...@@ -51,6 +41,12 @@
<script setup> <script setup>
const { $openLibrarySelect } = useLibraryStore() const { $openLibrarySelect } = useLibraryStore()
const textColor = 'text-gray-500 dark:text-gray-400' const textColor = 'text-gray-500 dark:text-gray-400'
const props = defineProps({
item: {
type: Object,
default: (() => {})()
}
})
function handleOpenSelect (id) { function handleOpenSelect (id) {
$openLibrarySelect(id) $openLibrarySelect(id)
} }
......
export default () => {
// 查询主题列表
const getThemeList = async () => {
const { data, error } = await useRequest('/v1/chat/completion/list', {
method: 'get'
})
if (error.value) {
return []
}
return data.value.data || []
}
return {
getThemeList
}
}
\ No newline at end of file
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div class="flex gap-10"> <div class="flex gap-10">
<div class="flex flex-col flex-grow"> <div class="flex flex-col flex-grow">
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<ILibraryThread /> <ILibraryThread
<ILibraryThread /> v-for="item in themes"
<ILibraryThread /> :item="item"
<ILibraryThread /> :key="item.c_id"
<ILibraryThread /> />
</div> </div>
</div> </div>
<div class="flex flex-col flex-shrink-0 w-56"> <div class="flex flex-col flex-shrink-0 w-56">
...@@ -38,16 +38,23 @@ ...@@ -38,16 +38,23 @@
<script setup> <script setup>
const { $openLibraryCreate } = useLibraryStore() const { $openLibraryCreate } = useLibraryStore()
const { getCollection } = useCollectionRequest() const { getCollection } = useCollectionRequest()
const { getThemeList } = useThemeRequest()
function handleOpenCreateLibrary () { function handleOpenCreateLibrary () {
$openLibraryCreate() $openLibraryCreate()
} }
// 合集列表 // 合集列表
const collection = ref([]) const collection = ref([])
// 主题列表
const themes = ref([])
async function getCollectionData () { async function getCollectionData () {
collection.value = await getCollection() collection.value = await getCollection()
} }
async function getThemeListData() {
themes.value = await getThemeList()
}
nextTick(() => { nextTick(() => {
getThemeListData()
getCollectionData() getCollectionData()
}) })
</script> </script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册