Skip to content
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

新建渠道加一个预设提示功能 #1920

Closed
5 tasks done
pptomtiger opened this issue Nov 10, 2024 · 2 comments
Closed
5 tasks done

新建渠道加一个预设提示功能 #1920

pptomtiger opened this issue Nov 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@pptomtiger
Copy link

pptomtiger commented Nov 10, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,已确定现有版本无法满足需求
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

功能描述
在新建渠道的时候,加一个预设系统提示词功能
应用场景
每个独立的渠道,自定义定向模型,适应不同的业务场景,不同的业务场景需要不同的预设系统提示词,这样返回的内容就是相关提示词的要求内容。当然预设系统提示可以默认空白。

@pptomtiger pptomtiger added the enhancement New feature or request label Nov 10, 2024
@songquanpeng
Copy link
Owner

d27d495e0fa9eb42bd784d6dda8f510d

@ArcaneWhispers
Copy link

提示词这个功能是前端的事情,渠道中就不应该存在这个功能。有心之人会利用这个功能做假模型骗钱,现在已经有部分中转站利用提示词假冒cluade模型。

daqingllm added a commit to daqingllm/one-api that referenced this issue Dec 29, 2024
* fix: Groq organization not auto-disabled when blocked (songquanpeng#1822)

* fix: postgres use COALESCE replace null (songquanpeng#1793)

Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>

* feat: update disabled channel (songquanpeng#1780)

* Update disabled channel

* Update manage.go

* Update manage.go

* chore: add missing space

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>

* feat: ResponseFormat support json_schema (songquanpeng#1759)

* feat: responseFormat support json_schema

* chore: rename struct name

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>

* fix: fix ali embedding model always use v1 (songquanpeng#1747)

* fix:ali embedding model: v2 and v3

* chore: use ctxkey.RequestModel to eliminate hardcoding

---------

Co-authored-by: xuejia <gexuejia@djbx.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>

* feat: update stepfun models (songquanpeng#1740)

Co-authored-by: chenlinfeng <chenlinfeng@step.ai>

* feat: add lobechat open link options (songquanpeng#1741)

Co-authored-by: Star <iii9777@163.com>

* fix: getTokenById return token nil, make panic (songquanpeng#1728)

* fix:getTokenById return token nil, make panic

* chore: remove useless err check

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>

* feat: support new openai models (4o 0806, chatgpt-4o-latest) (songquanpeng#1721)

* feat: support new model gpt-4o-2024-08-06

* feat: support new model chatgpt-4o-latest

* feat: add oidc support (songquanpeng#1725)

* feat: add the ui for configuring the third-party standard OAuth2.0/OIDC.

- update SystemSetting.js
- add setup ui
- add configuration

* feat: add the ui for "allow the OAuth 2.0 to login"

- update SystemSetting.js

* feat: add OAuth 2.0 web ui and its process functions

- update common.js
- update AuthLogin.js
- update config.js

* fix: missing "Userinfo" endpoint configuration entry, used by OAuth clients to request user information from the IdP.

- update config.js
- update SystemSetting.js

* feat: updated the icons for Lark and OIDC to match the style of the icons for WeChat, EMail, GitHub.

- update lark.svg
- new oidc.svg

* refactor: Changing OAuth 2.0 to OIDC

* feat: add OIDC login method

* feat: Add support for OIDC login to the backend

* fix: Change the AppId and AppSecret on the Web UI to the standard usage: ClientId, ClientSecret.

* feat: Support quick configuration of OIDC through Well-Known Discovery Endpoint

* feat: Standardize terminology, add well-known configuration

- Change the AppId and AppSecret on the Server End to the standard usage: ClientId, ClientSecret.
- add Well-Known configuration to store in database, no actual use in server end but store and display in web ui only

* feat: support SparkDesk-v3.1-128K (songquanpeng#1732)

* feat: 支持SparkDesk-v3.1-128K以及hunyuan-vision

* feat: 支持SparkDesk-v3.1-128K以及hunyuan-vision

---------

Co-authored-by: lihangfu <hfli8@iflytek.com>

* feat: add siliconflow usage (songquanpeng#1798)

* fix: return the usage info if not null (songquanpeng#1792)

Usage is missing.

* fix: modify the type of token models to be text (songquanpeng#1761)

* fix: modify the type of token models to be text

* chore: update receiver name

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>

* feat: support multipart/form-data format request (songquanpeng#1690)

* "add parser multipart/form-data"

* chore: fix impl

* chore: update impl

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>

* feat: support SparkDesk-v3.5-32K (songquanpeng#1832)

Co-authored-by: lihangfu <hfli8@iflytek.com>

* fix:unsuccessful lobechat redirection link (songquanpeng#1843)

* feat: add Vertex AI gemini-1.5-pro-002 and gemini-1.5-flash-002 (songquanpeng#1854)

* fix: use modelMap when testing a channel (songquanpeng#1855)

Co-authored-by: oliang <oliang@tencent.com>

* feat: update groq model and price (songquanpeng#1864)

* feat: add support for Claude Sonnet 3.5 v2 (songquanpeng#1888)

* feat: update Gemini adaptor to support custom response format (songquanpeng#1892)

* feat: always return usage in stream mode

* feat: able to hide test model selector and balance col

* feat: added support for Claude 3.5 Haiku (songquanpeng#1912)

* feat: add support for xAI (songquanpeng#1915)

* feat: add new claude models (songquanpeng#1910)

* feat: Add new models to ModelList in constants.go

* feat: update model lists and mappings for Claude 3.5 versions

---------

Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>

* fix: changeoptional field to pointer type (songquanpeng#1907)

* fix:修复在渠道配置中设置模型重定向时,temperature为0被忽略的问题

* fix: set optional fields to pointer type

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>

* feat: update GeneralOpenAIRequest

* fix: update Spark Lite's domain to lite (songquanpeng#1896)

* feat: able to use ENFORCE_INCLUDE_USAGE to enforce include usage in response

* feat: support set system prompt for channel (close songquanpeng#1920)

* feat: support set system_prompt for theme air & berry

* feat: add warning in log when system prompt is reset

* feat: support gzip decode (songquanpeng#1962)

* feat: update feishu oauth login

* docs: update readme

* feat: support replicate chat models (songquanpeng#1989)

* feat: add Replicate adaptor and integrate into channel and API types

* feat: support llm chat on replicate

* feat: add support for new OpenAI models and update billing ratios (songquanpeng#1990)

* feat: add gemini-2.0-flash-exp and fix race condition in processChannelRelayError (songquanpeng#1983)

Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>

* chore(deps): bump golang.org/x/crypto from 0.24.0 to 0.31.0 (songquanpeng#1976)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.31.0.
- [Commits](golang/crypto@v0.24.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: update qwen model and price (songquanpeng#1966)

* feat: enhance response handling to support gemini-2.0-thinking (songquanpeng#1995)

* fix: fix balance query for siliconflow (songquanpeng#1960)

* docs: add tutorial section for BT Panel installation (songquanpeng#1985)

* Update README.md

在国内有大部分用户都在使用宝塔面板管理服务器,因此增加使用宝塔面板部署的教程,可视化的部署方式可以帮助用户更加便捷的部署one-api

* docs: update readme

---------

Co-authored-by: JustSong <quanpengsong@gmail.com>

* fix: remove the duplicate `claude-3-5-haiku-20241022` in Anthropic's base model list (songquanpeng#1957)

* Update constants.go

Remove the duplicate `claude-3-5-haiku-20241022` causing issue 1928

* fix: fix syntax error

---------

Co-authored-by: JustSong <quanpengsong@gmail.com>

* feat: support Redis Sentinel and Redis Cluster (songquanpeng#1952)

* feature: support Redis Sentinel and Redis Cluster

* chore: update implementation

---------

Co-authored-by: JustSong <quanpengsong@gmail.com>

* feat: add balance query support for DeepSeek (songquanpeng#1946)

* Support Balance Query for DeepSeek

* Fix

* chore: update model mapping implementation for audio (songquanpeng#1932)

* fixed model mapping

* chore: update implementation

---------

Co-authored-by: JustSong <quanpengsong@gmail.com>

* feat: support gpt-4o-2024-11-20 (songquanpeng#1941)

* fix: add branch limitation and drop pull_request trigger for ci.yml

* fix: add branch check

* docs: update README.md

* chore: update readme

* chore: update ci yaml

* new disable

* fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: AJ's Life Journey <kaqijiang@gmail.com>
Co-authored-by: guogeer <1500065870@qq.com>
Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>
Co-authored-by: Ghostz <137054651+ye4293@users.noreply.github.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
Co-authored-by: majian <46617237@qq.com>
Co-authored-by: leavegee <474451886@qq.com>
Co-authored-by: xuejia <gexuejia@djbx.com>
Co-authored-by: forrestlinfeng <forrestlinfeng@gmail.com>
Co-authored-by: chenlinfeng <chenlinfeng@step.ai>
Co-authored-by: 千寻简 <93156452+MrChihiro@users.noreply.github.com>
Co-authored-by: Star <iii9777@163.com>
Co-authored-by: qinguoyi <1532979219@qq.com>
Co-authored-by: TAKO <20227709+HynoR@users.noreply.github.com>
Co-authored-by: OnEvent <35189106+Oniokey@users.noreply.github.com>
Co-authored-by: lihangfu <280001404@qq.com>
Co-authored-by: lihangfu <hfli8@iflytek.com>
Co-authored-by: TimeTrapzz <55572425+TimeTrapzz@users.noreply.github.com>
Co-authored-by: byte911 <92360792+byte911@users.noreply.github.com>
Co-authored-by: 徐瑞东 <xuruidong@gmail.com>
Co-authored-by: 抒情熊 <2669184984@qq.com>
Co-authored-by: Pan, Wen-Ming <372476388@qq.com>
Co-authored-by: liangjs <761232680@qq.com>
Co-authored-by: oliang <oliang@tencent.com>
Co-authored-by: longkeyy <longkeyy@gmail.com>
Co-authored-by: shaoyun <shaoyun@yeah.net>
Co-authored-by: Wei Tingjiang <mxdlzg@163.com>
Co-authored-by: Ryo Shen <5581972+lwshen@users.noreply.github.com>
Co-authored-by: Laisky.Cai <github@laisky.com>
Co-authored-by: wanthigh <31470660+wanthigh@users.noreply.github.com>
Co-authored-by: Calcium-Ion <61247483+Calcium-Ion@users.noreply.github.com>
Co-authored-by: JustSong <quanpengsong@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ke Wang <nmg_wk@yeah.net>
Co-authored-by: bestlaw66 <94432849+bestlaw66@users.noreply.github.com>
Co-authored-by: ZhangTianrong <ZhangTianrong@users.noreply.github.com>
Co-authored-by: Yuwei Ba <contact@yba.dev>
Co-authored-by: Qiying Wang <781345688@qq.com>
Co-authored-by: liuliming <liuliming@yupaopao.cn>
SheldonLiu0412 pushed a commit to SheldonLiu0412/one-api that referenced this issue Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants