Skip to content

Refactor the AI API access framework #9262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
88250 opened this issue Sep 25, 2023 · 25 comments
Closed

Refactor the AI API access framework #9262

88250 opened this issue Sep 25, 2023 · 25 comments

Comments

@88250
Copy link
Member

88250 commented Sep 25, 2023

Extract common interfaces to enable access to different API implementations.

@88250 88250 added the Refactor label Sep 25, 2023
@88250 88250 added this to the backlog milestone Sep 25, 2023
@Zuoqiu-Yingyi
Copy link
Contributor

最好在使用时不再使用遮罩, 在执行一些用时较长的 AI 任务时难以多任务并行执行, 且无法进行其他内容的编辑

@Lizhen0628
Copy link

可以增加 temperature 和 n 等参数调节的能力

@mohuishou
Copy link

感觉最好支持流式api实时显示生成结果,现在siyuan的ai功能基本没用就是等待太久了,会导致没有预期

@Achuan-2
Copy link
Member

Achuan-2 commented Oct 23, 2023

其实笔记软件使用ai,我觉得最大的前景是向量化个人知识库,使用ChatGPT询问,打造个人的知识管家
见:https://github.com/langchain-ai/langchain
只是整合AI API,其实作用不大,目前市面上已经有这样的软件了,对话体验、保留历史对话记录、对话支持导出markdown、支持各种prompt,本身体验都已经很好了

@Zuoqiu-Yingyi
Copy link
Contributor

只是整合AI API,其实作用不大,目前市面上已经有这样的软件了,对话体验、保留历史对话记录、对话支持导出markdown、支持各种prompt,本身体验都已经很好了

能直接在笔记里面用的话体验还是挺好的, 比如翻译下文档之类, 比粘贴来粘贴去方便不少

@Lizhen0628
Copy link

阿里通义千问的效果非常不错,建议支持。

@ttimasdf
Copy link

ttimasdf commented Dec 12, 2023

其实笔记软件使用ai,我觉得最大的前景是向量化个人知识库,使用ChatGPT询问,打造个人的知识管家

之前开发者好像说过这个以后不在核心里实现,社区可以自己做插件……

但其实我也觉得只有引入embedding,嵌入LLM才有意义,AI 不知道笔记的上下文,光嵌入个api,使用体验不仅比不上chatgpt,甚至不如API套壳的webui(如Yidadaa/ChatGPT-Next-Web),生成索引用的embedding model调用次数和存储embedding的向量数据库存储额度,也可以计入年付订阅里,也可以通过pro feature让用户自建(🗄️ Vector databases - Embedchain)。

如果这个能进到年付订阅里,那我只能说:

image

@dwinkler1
Copy link

dwinkler1 commented Jan 6, 2024

Possibly relevant here https://liuyun.io/article/1704494054801

I think it would be great if e.g. we could pick models from ollama directly. There are very good models out there small enough to run on newer consumer hardware.

Reference:

https://github.com/hinterdupfinger/obsidian-ollama

@ghost
Copy link

ghost commented Jan 22, 2024

新的提问回答可以不连续上文吗,目前应该是联系上文的
https://ld246.com/article/1703127711381/comment/1703138900607#comments

@88250

This comment was marked as outdated.

@88250
Copy link
Member Author

88250 commented Jan 25, 2024

@Benjamin-Watson0 在 #10255 中加入一个菜单操作“清空上下文”。

@ghost
Copy link

ghost commented Jan 26, 2024

好滴(●'◡'●)

@dwinkler1
Copy link

Possible inspiration https://github.com/reorproject/reor

@TCOTC
Copy link
Contributor

TCOTC commented Feb 24, 2024

google gemini #10104

@Zuoqiu-Yingyi
Copy link
Contributor

@88250
瞅到一个 通过标准的 OpenAI API 格式访问所有的大模型 的项目, 可以参考一下
GitHub - songquanpeng/one-api: OpenAI 接口管理 & 分发系统

@88250
Copy link
Member Author

88250 commented Mar 20, 2024

考虑了下,AI 服务太多,仅靠我们对接的话不大现实,这个方面还是靠社区插件对接吧。

后续内核仅考虑对接兼容 OpenAI API 的模型(需要略微调整的,比如 Azure OpenAI),感谢各位理解和关注。

@88250 88250 closed this as completed Mar 20, 2024
@88250 88250 added Idea and removed Refactor labels Mar 20, 2024
@88250 88250 removed this from the backlog milestone Mar 20, 2024
@frostime
Copy link
Contributor

考虑了下,AI 服务太多,仅靠我们对接的话不大现实,这个方面还是靠社区插件对接吧。

后续内核仅考虑对接兼容 OpenAI API 的模型(需要略微调整的,比如 Azure OpenAI),感谢各位理解和关注。

插件提供功能的话,是不是提供一套标准化接口比较好?否则一个插件有一个插件的实现方式,最后容易乱掉。

@88250
Copy link
Member Author

88250 commented Mar 20, 2024 via email

@heartacker
Copy link

openai限制非支持国家和地区的api调用

@TCOTC
Copy link
Contributor

TCOTC commented Jun 26, 2024

用代理或者转发

@heartacker
Copy link

用代理或者转发

作为一个普通用户,用上AI 的心智投入和成本越来越高

@TCOTC
Copy link
Contributor

TCOTC commented Jun 26, 2024

用国内的

@jaar23
Copy link

jaar23 commented Jun 28, 2024

除了openai 不支持国内以后,还有其他的支持吗?在国内有没有统一的API spec, 就好像OpenAI API spec那样?

@TCOTC
Copy link
Contributor

TCOTC commented Jun 28, 2024

国内的大模型多数都兼容 OpenAI 的格式,直接用就行了

@X-49
Copy link

X-49 commented Aug 21, 2024

How can I use Gemini in SiYuan? In Obsidian, it was enough for me to install the 'Smart Connections' plugin and specify my API key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests