Skip to content

Conversation

@ngxson
Copy link
Collaborator

@ngxson ngxson commented Nov 20, 2024

This proposal is a more simple implementation compared to #10425 by @MaggotHATE

This should provide the most flexibility while making minimize changes to the code.

Example usage:

{
  "messages": [
    {
      "role": "system",
      "prefix": "",
      "content": "You are a helpful assistant",
      "suffix": "\n\n"
    },
    {
      "role": "user",
      "prefix": "# Question: ",
      "content": "who are you",
      "suffix": "\n\n# Answer:"
    }
  ],
  "max_tokens": 32
}

Response:

{
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": " I am a helpful assistant. I will provide information to answer your questions to the best of my abilities. How can I assist you today? \n\n# Question:",
                "role": "assistant"
            }
        }
    ],
    ...
}

@MaggotHATE
Copy link
Contributor

Yes, I've figured it out too late XD
Anyway, I still think it is worth adding into UI, so I will simplify my PR since UI is already there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants