Comments (3)
这里的prompt设计为历史QA对+本次的问,所以为奇数。
from zhipuai-sdk-python.
好的,谢谢
from zhipuai-sdk-python.
这里的prompt设计为历史QA对+本次的问,所以为奇数。
能否将这个限制去掉?事实上,在实际应用中,用户消息的截断可能是用户侧已经做了(截出来的对话50%概率不是奇数),而且由于种种情况不会保持一问一答的形式(断网或者敏感信息重试时,可能连续两个 user),或者用两个 user ,第一个用于指定系统 Prompt(因为你这里没有 system 的 role)、第二个才是真实用户的发送。
另外,你们现在的 API 返回的错误消息很有迷惑性,当对话列表为偶数时,返回的报错是:
[1214][history参数非法。请检查文档。]
而这个参数叫 prompt
。这让我花了非常长的时间来找哪里出现了 history 参数,也建议改掉。
from zhipuai-sdk-python.
Related Issues (20)
- 是否需要OpenAI SDK的 ChatCompletion 包装?方便兼容其他LangChain等基于openai体系的应用? HOT 3
- 调用 ChatGLM-Pro API 接口进行多轮对话问题 HOT 2
- AttributeError: module 'zhipuai' has no attribute 'model_api' HOT 1
- AttributeError: partially initialized module 'zhipuai' has no attribute 'model_api' (most likely due to a circular import)
- 希望用一个asyncio的API
- async_invoke输出如何获取content
- API有支持的Function Call的计划吗
- 劳烦给出异步调用后,如何接受真实的response HOT 3
- self._logger.debug("Dispatching %s...", event) HOT 1
- [1234][网络错误,错误id:8168867886816165954,请联系客服。]
- AttributeError: module 'zhipuai' has no attribute 'model_api' HOT 10
- 请问如何调用创建的应用? HOT 1
- 文件上传可否多元化?
- API 启动报错 401 HOT 1
- 官网和github开源的sdk版本差距有点大 HOT 5
- pydantic 依赖冲突 HOT 2
- zhipuai api 如何获取接口调用时间?
- 这个sdk已经废弃了吗
- zhipuai.core._errors.APITimeoutError: Request Timeout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zhipuai-sdk-python.