Skip to content

How to specify system message separately from user for the request? #46

@lofti198

Description

@lofti198

I am using code as below:

 ChatGptOptions options = new ChatGptOptions()
 {
     BaseUrl = "https://api.openai.com", // The base URL for the OpenAI API
     Model = "gpt-3.5-turbo",           // The specific model to use
     Temperature = 0.7,                   // Controls randomness in the response (0-1)
     TopP = 0.9,                         // Controls diversity in the response (0-1)
     MaxTokens = 3500,                   // The maximum number of tokens in the response
     Stop = null,       // Sequence of tokens that will stop generation
     PresencePenalty = 0.0,              // Penalizes new tokens based on their existing presence in the context
     FrequencyPenalty = 0.0              // Penalizes new tokens based on their frequency in the context
 };

 var openai = new ChatGpt(openAiKey, options);
 var fixedSentence = await openai.Ask($"{instruction}: {data}");
 return fixedSentence;

However cant get how to speficy system message separately. For example I want to ask to rephrase user message and keep it in the original language (not-English).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions