提交 cc2e67fd 编写于 作者: D DebugIsFalse

添加记录请求

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