How to get the system message from trained model in java code

Poornima Baddi 0 Reputation points
2024-09-25T11:34:02.9933333+00:00

Hi,

I have written simple java code to get customized response.

List<ChatRequestMessage> chatMessages = new ArrayList<>();

chatMessages.add(new ChatRequestSystemMessage(

"If asked about your name, respond with 'Poornima'. If asked where you work, respond with 'Motive'. If a question is outside your knowledge, say 'I can look that up for you, but currently I don't have that information.'"));

chatMessages.add(new ChatRequestUserMessage("What is your name?"));

With above code, I am getting the correct response as Poornima as expected.

I have configured same data in the model Azure OpenAI Service. So when I removed ChatRequestSystemMessage line from above code, I am not getting the same response. It giving random answer eventhough I have trained my model.

How do I get the response from my trained model in Azure OpenAI Service to respond with specific answers like "Poornima" from java code?

How to configure/use trained data in java code as system message?.

Thanks,

Poornima

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,078 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.