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

Support system message in prompt #973

Open
nkwangleiGIT opened this issue Apr 2, 2024 · 3 comments
Open

Support system message in prompt #973

nkwangleiGIT opened this issue Apr 2, 2024 · 3 comments
Labels
enhancement New feature or request priority-high
Milestone

Comments

@nkwangleiGIT
Copy link
Contributor

System message:

It means the system developer who can internally give some instructions for the conversation. developer can provide option for user input also which depends on the system requirements.

example

    {
      "model": "mode-id",
      "messages": [
       {
          "role": "user",
          "content": "tell me a joke"
       },
       {
          "role": "system",
          "content": "You are an assistant that speaks like Shakespeare."
       }
      ]
     }
@Abirdcfly
Copy link
Collaborator

Abirdcfly commented Apr 2, 2024

We did not expose this option on the Web UI(because our zhipu sdk not support, but use fastchat is ok), but we support it at the CRD level spec.systemMessage, and we can manually update CR now.

# kubectl get -o yaml prompts.prompt.arcadia.kubeagi.k8s.com.cn -n kubeagi-system system
apiVersion: prompt.arcadia.kubeagi.k8s.com.cn/v1alpha1
kind: Prompt
metadata:
  annotations:
    arcadia.kubeagi.k8s.com.cn/input-rules: '[{"kind":"Input","length":1}]'
    arcadia.kubeagi.k8s.com.cn/output-rules: '[{"length":1}]'
  creationTimestamp: "2024-04-02T09:11:50Z"
  finalizers:
  - arcadia.kubeagi.k8s.com.cn/finalizer
  generation: 4
  name: system
  namespace: kubeagi-system
  resourceVersion: "60663672"
  uid: 74b92585-e9f1-46ec-9d91-b036d89f78da
spec:
  description: prompt
  displayName: prompt
  systemMessage: 将我的话翻译为英语
  userMessage: '{{.question}}'
status:
  conditions:
  - lastSuccessfulTime: "2024-04-02T09:17:11Z"
    lastTransitionTime: "2024-04-02T09:17:11Z"
    message: Success
    reason: ""
    status: "True"
    type: Ready
  observedGeneration: 4

result show:
CleanShot 2024-04-02 at 17 20 24

@bjwswang
Copy link
Collaborator

bjwswang commented Apr 2, 2024

@Abirdcfly @nkwangleiGIT We can also expose this option to users. @liutianyi0801 FYI

@bjwswang bjwswang added this to the v0.3.0 milestone Apr 2, 2024
@bjwswang bjwswang added enhancement New feature or request priority-high labels Apr 2, 2024
@liutianyi0801
Copy link
Collaborator

按照我的理解,我们的角色设定就是系统 prompt
image

用户会基于此,在对话的时候,进行自己的提示词编辑,如:
在对话的过程中,输入:

请阅读我上传的文档,并生成一个详细摘要。
目标是通过摘要提供一个全面的文档大意,使读者即使没有阅读整个文档,也能理解其核心内容和重要性。字数不限制,但请确保摘要准确、全面且易于理解。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

No branches or pull requests

4 participants