Skip to content

Commit

Permalink
Merge pull request #6 from TarsLab/multi-rounds
Browse files Browse the repository at this point in the history
Multi rounds
  • Loading branch information
ae86jack committed Apr 5, 2024
2 parents 2ff4242 + 9f75118 commit 0db11e0
Show file tree
Hide file tree
Showing 21 changed files with 5,396 additions and 1,332 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

AI-zhipu is an Obsidian plugin that helps you utilize the Zhipu API to generate content, create images from text, answer questions based on knowledge databases, and more AI capabilities. You can customize prompt template to build your own exclusive knowledge management system based on Zhipu AI.

## New Features

- Support for multi-round conversation. The start of a multi-round conversation is marked by two consecutive lines of horizontal lines, such as two lines of "---", and the end is marked by a single line of horizontal line.

## How to use

- When the plugin is initialized, it will automatically create a folder `Aizhipu` in the vault directory, and create prompt template files, with both Chinese and English templates.
Expand All @@ -29,9 +33,14 @@ AI-zhipu is an Obsidian plugin that helps you utilize the Zhipu API to generate
## Requirements

- An API key from [ZhiPu AI](https://open.bigmodel.cn)
- network connection when using the command "Generate from the selected text / line / block"
- Network connection when using the command "Generate from the selected text / line / block"
- Using the ZhiPu API will incur charges. For detailed fee information, please refer to the [official ZhiPu website](https://open.bigmodel.cn). It is important to note that generating images from text consumes a significant number of tokens.

## Install from the marketplace

1. Open the Obsidian community plugin marketplace
2. Search for "AI Zhipu"

## Install from Github

1. From the release page, download `manifest.json` and `main.js` to `<vault>/.obsidian/plugins/ai-zhipu`
Expand Down
11 changes: 10 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

# 简介

Ai-zhipu 是一个 obsidian 的插件,帮助你使用智谱 API, 生成内容、文生图、基于知识库问答等等 AI 能力,你可以定制提示词模板,基于智谱 AI 来打造你的专属知识管理系统。
Ai-zhipu 是一个 obsidian 的插件,帮助你使用智谱 API,生成内容、文生图、基于知识库问答等等 AI 能力,你可以定制提示词模板,基于智谱 AI 来打造你的专属知识管理系统。

## 新特性

- 支持多轮会话,多轮会话的开始标记是连续两行的水平线,例如两行的“---”,结束标记是一行水平线

## 如何使用

Expand All @@ -32,6 +36,11 @@ Ai-zhipu 是一个 obsidian 的插件,帮助你使用智谱 API, 生成内容
- 使用命令“生成内容(基于选中的文本、行、区块)”时需要网络连接
- 智谱 API 调用会产生费用,具体费用请参考[智谱官网](https://open.bigmodel.cn)。需要注意的是,文生图的 tokens 消耗较大。

## 从市场安装

1. 打开 Obsidian 的社区插件市场
2. 搜索“AI Zhipu”

## 从 Github 安装

1. 从 release 页面下载 `manifest.json``main.js``<vault>/.obsidian/plugins/ai-zhipu`
Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom'
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ai-zhipu",
"name": "AI Zhipu",
"version": "1.0.4",
"version": "2.0.0",
"minAppVersion": "1.0.0",
"description": "Generate text using the ZhipuAI API.",
"author": "Tarslab",
Expand Down
Loading

0 comments on commit 0db11e0

Please sign in to comment.