You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
@lofti198 , you need to call SetConversationSystemMessage method of ChatGpt object. It expects two parameters, first one being 'conversationId' and second one being the 'system message'.
For example, in your case, you can do:
var openai = new ChatGpt(openAiKey, options);
//set system message
openai.SetConversationSystemMessage("your-conversationId", "rephrase user message and keep it in the original language");
//chat with user message
var fixedSentence = await openai.Ask($"{instruction}: {data}");
return fixedSentence;
zeecorleone
added a commit
to zeecorleone/ChatGPT.Net
that referenced
this issue
May 23, 2024
I am using code as below:
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).
The text was updated successfully, but these errors were encountered: