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

System Prompt Configuration Not Being Used #454

Open
ChuangLee opened this issue Apr 12, 2024 · 1 comment
Open

System Prompt Configuration Not Being Used #454

ChuangLee opened this issue Apr 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ChuangLee
Copy link
Contributor

What happened?

The user-configured System Prompt does not seem to be effective. Upon inspecting the code, I observed that the system prompt is consistently read from default-completion-system-prompt.txt. The method ConfigurationSettings.getCurrentState().getSystemPrompt() is invoked only once in OpenAIChatCompletionMessage.
The situation with the commit message prompt is the same.
relate code:

CompletionRequestProvider.java
public static final String COMPLETION_SYSTEM_PROMPT = getResourceContent(
      "/prompts/default-completion-system-prompt.txt");

public static final String GENERATE_COMMIT_MESSAGE_SYSTEM_PROMPT = getResourceContent(
      "/prompts/generate-commit-message-system-prompt.txt");


var systemPrompt = COMPLETION_SYSTEM_PROMPT;

Relevant log output or stack trace

none

Steps to reproduce

just set a new new System Prompt in Configuration, it doesn't work

CodeGPT version

1.16.0

Operating System

None

@ChuangLee ChuangLee added the bug Something isn't working label Apr 12, 2024
reneleonhardt added a commit to reneleonhardt/CodeGPT that referenced this issue Apr 12, 2024
@reneleonhardt
Copy link
Contributor

@ChuangLee Thank you for reporting, I was able to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants