@Tom Chow Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
Question 1:
To add configurations such as stop sequences, temperature, and frequency penalty.
Answer:
You can modify your ChatCompletionOptions
object. Here’s an example of how you can include these parameters:
ChatCompletionOptions options = new()
{
Temperature = 0.7,
MaxTokens = 150,
FrequencyPenalty = 0.5,
PresencePenalty = 0.0,
StopSequences = new List<string> { "\n", "User:" }
};
Regarding connecting Azure Blob Storage with your AI Search and integrating it into your OpenAI model, you need to ensure that your data is properly indexed and accessible. You can follow the steps to connect your data source using Azure OpenAI Studio. Make sure to enable Cross-origin resource sharing (CORS) for your Azure Blob Storage. More info here and here.
. .
. Question 2: Integrating your chatbot into your solution.
.
Answer: You have two main options shared below, Both approaches can be compatible with mobile and web-based solutions. Using an API might offer more flexibility and scalability
API Call: Create an API that your solution can call. This is a flexible approach and can be used for both mobile and web-based solutions.
Direct Implementation: Integrate the chatbot directly into your backend. This might be simpler for some use cases but could be less flexible than an API.
. . .
Question 3: Customize the responses for questions that are not related to the provided documents .
.
Answer:
This can be done by setting specific instructions in the RoleInformation
property of your ChatCompletionOptions
. For example:
options.RoleInformation = "As a support representative of 'this company', I am here to provide any information related to it. If you require further assistance, would you like to be connected to an agent?";
This customization can be done using the GPT-4o model or other models available in Azure OpenAI Service. You don’t necessarily need custom models for this; you can achieve it through prompt engineering and setting appropriate instructions. . .
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help. ** Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.