npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aqcq/chat-vue

v0.3.24

Published

Movetab Chatgpt Vue

Readme

@aqcq/chat-vue

Vue 3 版本的 ChatGPT 聊天组件,与 React 版本 @aqcq/chat3 功能一致。

安装

npm install @aqcq/chat-vue
# 或
pnpm add @aqcq/chat-vue

使用

基本使用

<template>
  <Chat
    :width="800"
    :height="600"
    :model-config="modelConfig"
  />
</template>

<script setup lang="ts">
import { Chat, ChatPlugin } from '@aqcq/chat-vue';
import type { ModelConfig } from '@aqcq/chat-vue';

// 在 main.ts 中需要安装插件
// app.use(ChatPlugin);

const modelConfig: ModelConfig = {
  baseUrl: 'https://api.openai.com/v1/chat/completions',
  apiKey: 'your-api-key',
  model: 'gpt-3.5-turbo',
};
</script>

弹窗使用

<template>
  <button @click="open = true">打开聊天</button>
  
  <ChatModal
    v-model:open="open"
    :width="800"
    :height="600"
    :model-config="modelConfig"
  />
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { ChatModal } from '@aqcq/chat-vue';

const open = ref(false);

const modelConfig = {
  baseUrl: 'https://api.openai.com/v1/chat/completions',
  apiKey: 'your-api-key',
};
</script>

在 main.ts 中安装插件

import { createApp } from 'vue';
import { ChatPlugin } from '@aqcq/chat-vue';
import App from './App.vue';

const app = createApp(App);
app.use(ChatPlugin);
app.mount('#app');

Props

Chat Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | width | string | number | '100%' | 宽度 | | height | string | number | '100%' | 高度 | | modelConfig | ModelConfig | - | 模型配置 | | isFullscreen | boolean | false | 是否全屏 | | boxShadow | string | '0 4px 32px rgba(0, 0, 0, 0.1)' | 阴影 | | borderRadius | string | number | 10 | 圆角 |

ChatModal Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | open | boolean | false | 是否打开 | | mask | boolean | true | 是否显示遮罩 | | maskClosable | boolean | true | 点击遮罩是否关闭 | | zIndex | number | 1000 | 层级 |

ModelConfig

interface ModelConfig {
  baseUrl?: string;    // API 地址
  apiKey?: string;     // API Key
  model?: string;      // 模型名称
  stream?: boolean;    // 是否流式返回
  temperature?: number; // 随机性
  top_p?: number;      // 核采样
  max_tokens?: number; // 最大 token 数
}

License

MIT