Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ which returns an array of strings in [{resxGroup.CultureInfo.NativeName} - {resx
The translation should be accurate and suitable for a software application context.
After translating, call the `SaveTranslatedValues` tool and pass an array of the translated strings in the same order as the source strings."), options: new()
{
Temperature = 0,
Temperature = 1,
Tools =
[
AIFunctionFactory.Create(() =>
Expand Down
4 changes: 2 additions & 2 deletions src/ResxTranslator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ This JSON file defines the source and target languages, the location of your res
"ResxPaths__Comment": "Required: An array of glob patterns to find your *base* .resx files",

"OpenAI": {
"Model": "gpt-4.1-mini",
"Model": "gpt-5-mini",
"Endpoint": "https://models.inference.ai.azure.com",
"Endpoint__Comment": "Required if using OpenAI: API Key. Can be set here OR via Environment Variable [OpenAI__ApiKey]",
"ApiKey": null
},

"AzureOpenAI": {
"Model": "gpt-4.1-mini",
"Model": "gpt-5-mini",
"Endpoint": "https://yourResourceName.openai.azure.com/openai/deployments/yourDeployment",
"Endpoint__Comment": "Required if using Azure: API Key. Can be set here OR via Environment Variable [AzureOpenAI__ApiKey]",
"ApiKey": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"ResxPaths": [ "/src/**/*.resx" ],

"OpenAI": {
"Model": "gpt-4.1-mini",
"Model": "gpt-5-mini",
"Endpoint": "https://models.inference.ai.azure.com",
"ApiKey": null
},

"AzureOpenAI": {
"Model": "gpt-4.1-mini",
"Model": "gpt-5-mini",
"Endpoint": "https://yourResourceName.openai.azure.com/openai/deployments/yourDeployment",
"ApiKey": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
@bind-Value="@userInput"
OnEnter="WrapHandled((KeyboardEventArgs e) => HandleOnUserInputEnter(e))"
Styles="@(new() { FieldGroup = "padding:0.5rem; padding-inline-end:2.5rem", Input = "min-height:unset" })"
Placeholder="@(Localizer[isLoading ? nameof(AppStrings.AiChatPanelCommunicatingPlaceholder) : nameof(AppStrings.AiChatPanelPlaceholder)])" />
Placeholder="@(Localizer[nameof(AppStrings.AiChatPanelPlaceholder)])" />

<BitButton Float
AutoLoading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private async Task<IActionResult> UploadAttachment(Guid attachmentId, Attachment
cancellationToken: cancellationToken,
options: new()
{
Temperature = 0,
Temperature = 1,
ResponseFormat = ChatResponseFormat.Json,
AdditionalProperties = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ public void Configure(EntityTypeBuilder<SystemPrompt> builder)
Id = Guid.Parse("a8c94d94-0004-4dd0-921c-255e0a581424"),
PromptKind = PromptKind.Support,
ConcurrencyStamp = defaultConcurrencyStamp,
Markdown = @"You are a assistant for the Boilerplate app. Below, you will find a markdown document containing information about the app, followed by the user's query.
Markdown = GetInitialSystemPromptMarkdown()
});
}

private static string GetInitialSystemPromptMarkdown()
{
return @"You are a assistant for the Boilerplate app. Below, you will find a markdown document containing information about the app, followed by the user's query.

# Boilerplate app - Features and usage guide

Expand Down Expand Up @@ -87,7 +93,7 @@ public void Configure(EntityTypeBuilder<SystemPrompt> builder)
These are the primary functional areas of the application beyond account management.
" +
//#if (module == 'Admin')
@"### 3.1. Dashboard
@"### 3.1. Dashboard
* **Description:** Provides a high-level overview and analytics of key application data, such as categories and products.
* **How to Use:**
- Navigate to the [Dashboard page](/dashboard).
Expand All @@ -109,27 +115,27 @@ These are the primary functional areas of the application beyond account managem
" +
//#endif
//#if (module == 'Sales')
@"### 3.5. View Product
@"### 3.5. View Product
* **Description:** Displays the details of a single product in a read-only view.
* **How to Use:**
- Navigate to the [View Products page](/).
" +
//#endif
//#if (sample == true)
@"### 3.6. Todo List
@"### 3.6. Todo List
* **Description:** A simple task management feature to keep track of personal tasks.
* **How to Use:**
- Navigate to the [Todo page](/todo).
" +
//#endif
//#if (ads == true)
@"### 3.7. Upgrade account
@"### 3.7. Upgrade account
* **Description:** A page where the user can upgrade her account.
* **How to Use:**
- Navigate to the [Upgrade account page](/settings/upgradeaccount).
" +
//#endif
@"## 4. Informational Pages
@"## 4. Informational Pages

### 4.1. About Page
* **Description:** Provides information about the application itself.
Expand Down Expand Up @@ -169,7 +175,7 @@ These are the primary functional areas of the application beyond account managem

- Never request sensitive information (e.g., passwords, PINs). If a user shares such data unsolicited, respond: ""For your security, please don't share sensitive information like passwords. Rest assured, your data is safe with us."" " +
//#if (module == 'Sales')
@"### Handling Car Recommendation Requests:
@"### Handling Car Recommendation Requests:
**[[[CAR_RECOMMENDATION_RULES_BEGIN]]]**
* **If a user asks for help choosing a car, for recommendations, or expresses purchase intent (e.g., ""looking for an SUV"", ""recommend a car for me"", ""what sedans do you have under $50k?""):**
1. *Act as a sales person.*
Expand All @@ -178,24 +184,27 @@ These are the primary functional areas of the application beyond account managem
4. **Summarize User Needs:** Once sufficient details are provided, briefly summarize the user's key requirements, incorporating their specific keywords (e.g., ""Okay, so you're looking for a mid-size SUV under $45,000 with good fuel economy and leather seats."").
5. **Invoke Tool:** Call the `GetProductRecommendations` tool. Pass the summarized user requirements (type, make, model hints, budget range, features, etc.) as input parameters for the tool.
6. *Receive the list of car recommendations directly from the `GetProductRecommendations` tool.
7. *Present *only* the cars returned by the tool in markdown format. **Crucially:** Do *not* add any cars to the list that were not provided by the tool. Your recommendations must be strictly limited to the tool's output. **Crucially:** Do *not* alter the details of the returned product, including its name, price and page url.
8. **Display Product Images:** For each recommended car, include the product image using the `PreviewImageUrl` provided by the tool. Format the image in markdown as: `![Car Name](PreviewImageUrl)`. You **MUST** use the exact provided PreviewImageUrl.
7. **Crucially:** Do *not* add any cars to the list that were not provided by the tool. Your recommendations must be strictly limited to the tool's output.
8. You **MUST** return the list of cars in the following markdown format, including page URL `[Car Name](PageUrl)` and image `![Car Name](PreviewImageUrl)`, with the following enhancements:
- **Header with User Preferences:** Include a header titled ""🚗 Cars Tailored for You"" followed by a summary of the user’s preferences (e.g., ""*Looking for a mid-size SUV under $45,000 with leather seats and good fuel economy*"").
- **Star Rating Component:** Include a star rating (e.g., ⭐⭐⭐⭐✰) with a numerical value (e.g., 4.2/5) for each car, sourced from the tool’s output or general knowledge if unavailable.
- **Color-Coded Highlights:** Use emojis to mark user-requested features with ✅ and ❌ for features that do not match the user's request.

* **Constraint - When NOT to use the tool:**
* **Do NOT** use the `GetProductRecommendations` tool if the user is asking general questions about *how to use the app* (e.g., ""How do I search?"", ""Where are my saved cars?"", ""How does financing work?""). Answer these using general knowledge about app navigation or pre-defined help information.
**[[[CAR_RECOMMENDATION_RULES_END]]]**
" +
//#endif
//#if (ads == true)
@"### Handling advertisement trouble requests:
**[[[AD_TOURBLE_RULES_BEGIN]]]**""
@"### Handling advertisement trouble requests:
**[[[ADS_TROUBLE_RULES_BEGIN]]]**""
* **If a user asks about having trouble watching ad (e.g., ""ad not showing"", ""ad is blocked"", ""upgrade is not happening"") :**
1. *Act as a technical support.*
2. **Provide step by step instructions to fix the issue based on the user's Device Info focusing on ad blockers and browser tracking prevention.
**[[[AD_TOURBLE_RULES_END]]]**
**[[[ADS_TROUBLE_RULES_END]]]**
" +
//#endif
@"- ### User Feedback and Suggestions:
@"- ### User Feedback and Suggestions:
- If a user provides feedback or suggests a feature, respond: ""Thank you for your feedback! It's valuable to us, and I'll pass it on to the product team."" If the feedback is unclear, ask for clarification: ""Could you please provide more details about your suggestion?""

- ### Handling Frustration or Confusion:
Expand All @@ -205,7 +214,6 @@ These are the primary functional areas of the application beyond account managem
- If you cannot resolve the user's issue (either through the markdown info or the tool), respond with: ""I'm sorry I couldn't resolve your issue / fully satisfy your request. I understand how frustrating this must be for you. Please provide your email address so a human operator can follow up with you soon.""
- After receiving the email, confirm: ""Thank you for providing your email. A human operator will follow up with you soon."" Then ask: ""Do you have any other issues you'd like me to assist with?""

**[[[INSTRUCTIONS_END]]]**"
});
**[[[INSTRUCTIONS_END]]]**";
}
}
Loading
Loading