wkgcass / demo-of-chat-in-issue

A demo repo of chat-in-issue github action: github.com/wkgcass/chat-in-issue
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

翻译markdown文档 #9

Open wkgcass opened 1 year ago

wkgcass commented 1 year ago

/system: 将用户输入的中文markdown文档翻译为英文,并保留markdown格式

wkgcass commented 1 year ago

/chat:

⚙️ prompt-from-tail-initial-max

Since v1.2

该配置可与prompt-limit配合使用。

最初读取时,从聊天上下文的最后面开始计算的最大字符数。

默认值为0

⚙️ prompt-exclude-ai-response

Since v1.2

在Prompt中剔除AI返回的内容。默认值为false

如果启用该功能,那么在有必要的时候,程序会自动在末尾消息前插入一条system消息,用于将末尾消息与之前的消息区分开来。

对指定的Chat上下文(Issue)进行特化配置

Since v1.2

通过在Issue中配置特定的Labels,可以覆盖yaml中的全局配置。

Label的名称以chat-in-issue/开头,后面紧跟配置项的名称,然后紧跟一个=,最后是其需要配置的数值。

如下配置项支持通过Labels覆盖:

github-actions[bot] commented 1 year ago

/ai-says:

⚙️ prompt-from-tail-initial-max

Since v1.2

This configuration can be used in conjunction with prompt-limit.

The maximum number of characters counted from the end of the chat context when initially read.

The default value is 0.

⚙️ prompt-exclude-ai-response

Since v1.2

Exclude the content returned by AI in the prompt. The default value is false.

If this function is enabled, the program will automatically insert a system message before the last message when necessary, which is used to distinguish the last message from previous messages.

Specialized Configuration for Specific Chat Contexts (Issues)

Since v1.2

By configuring specific labels in the issue, you can override the global configuration in the yaml file.

The label name starts with chat-in-issue/, followed by the name of the configuration item, then followed by = and its required configuration value.

The following configuration items support overriding with labels:

wkgcass commented 1 year ago

/chat:

⚙️ prompt-limit

该配置可与prompt-from-beginning-max配合使用。

Prompt最大字符数限制。

如果整个聊天上下文的总字数不超过该值,则所有内容都将作为prompt消息。
否则将从末尾开始,取不超过$prompt-from-tail-initial-max数量的字符;
然后再从最前面开始,取不超过$prompt-from-beginning-max数量的字符;
最后从第一步最终读取的位置开始,取总量不超过$prompt-limit数量的字符。

如果某条消息被截断,则该消息整体都会被丢弃。

默认值为3000

github-actions[bot] commented 1 year ago

/ai-says:

⚙️ prompt-limit

This configuration can be used in conjunction with prompt-from-beginning-max.

Maximum character limit for prompt messages.

If the total number of characters in the entire chat context does not exceed this value, all content will be used as prompt messages.
Otherwise, the program will take up to $prompt-from-tail-initial-max characters starting from the end;
then take up to $prompt-from-beginning-max characters starting from the front;
finally, take up to $prompt-limit characters starting from the final position determined in the first step.

If a message is truncated, the entire message will be discarded.

The default value is 3000.

wkgcass commented 1 year ago

/chat:

⚙️ trim-mode

Since v1.2

定义对文本进行trim的方式。默认值为normal

支持如下trim模式:

  1. normal: 将文本整体视为一个字符串,trim该字符串的前后空白
  2. none: 不进行任何trim
  3. each-line: 对每一行都trim其前后空白,并且删除空行
github-actions[bot] commented 1 year ago

/ai-says:

⚙️ trim-mode

Since v1.2

Defines the method of trimming the text. The default value is normal.

The following trim modes are supported:

  1. normal: Treats the entire text as a string and trims the leading and trailing whitespaces of the string.
  2. none: No trimming will be done.
  3. each-line: Trims the leading and trailing whitespaces of each line and deletes empty lines.