diff --git a/acr.txt b/acr.txt new file mode 100644 index 00000000..3536a8ec --- /dev/null +++ b/acr.txt @@ -0,0 +1,30 @@ +azd deploy + +Deploying services (azd deploy) + + Deploying service indexer + Deploying service indexer (Building Docker image) + (x) Failed: Deploying service indexer + +ERROR: failed deploying service 'indexer': failing invoking action 'deploy', failed logging into container registry, token: failed getting ACR token: POST https://crx2y5k2ccncqou.azurecr.io/oauth2/exchange +-------------------------------------------------------------------------------- +RESPONSE 401: 401 Unauthorized +ERROR CODE UNAVAILABLE +-------------------------------------------------------------------------------- +Response contained no body +-------------------------------------------------------------------------------- +, admin: getting container registry credentials: POST https://management.azure.com/subscriptions/7944cce1-9fc2-4583-a3a2-8211a625ea06/resourceGroups/rg-search-openai-js/providers/Microsoft.ContainerRegistry/registries/crx2y5k2ccncqou/listCredentials +-------------------------------------------------------------------------------- +RESPONSE 400: 400 Bad Request +ERROR CODE: UnAuthorizedForCredentialOperations +-------------------------------------------------------------------------------- +{ + "error": { + "code": "UnAuthorizedForCredentialOperations", + "message": "Cannot perform credential operations for /subscriptions/7944cce1-9fc2-4583-a3a2-8211a625ea06/resourceGroups/rg-search-openai-js/providers/Microsoft.ContainerRegistry/registries/crx2y5k2ccncqou as admin user is disabled. Kindly enable admin user as per docs: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication#admin-account" + }, + "status": "Failed" +} +-------------------------------------------------------------------------------- + +TraceID: 0c60e512e83de6e1b8af4daa7dcbe49c \ No newline at end of file diff --git a/packages/chat-component/src/components/chat-controller.ts b/packages/chat-component/src/components/chat-controller.ts index 267f94cf..241758e2 100644 --- a/packages/chat-component/src/components/chat-controller.ts +++ b/packages/chat-component/src/components/chat-controller.ts @@ -138,7 +138,7 @@ export class ChatController implements ReactiveController { followingSteps.push(...(processedText.arrays[1] as string[])); followupQuestions.push(...(processedText.arrays[2] as string[])); thoughts = generatedResponse.context?.thoughts ?? ''; - dataPoints = generatedResponse.context?.data_points ?? []; + dataPoints = generatedResponse.context?.data_points?.text ?? []; await updateChatWithMessageOrChunk(messageToUpdate, false); } diff --git a/packages/chat-component/src/core/parser/index.ts b/packages/chat-component/src/core/parser/index.ts index ee026269..e7a76daf 100644 --- a/packages/chat-component/src/core/parser/index.ts +++ b/packages/chat-component/src/core/parser/index.ts @@ -49,7 +49,7 @@ export async function parseStreamedMessages({ const { content, context } = chunk.choices[0].delta; if (context?.data_points) { - updatedEntry.dataPoints = context.data_points ?? []; + updatedEntry.dataPoints = context.data_points?.text ?? []; updatedEntry.thoughts = context.thoughts ?? ''; continue; diff --git a/packages/chat-component/src/types.d.ts b/packages/chat-component/src/types.d.ts index 2b57756b..f00725a5 100644 --- a/packages/chat-component/src/types.d.ts +++ b/packages/chat-component/src/types.d.ts @@ -82,7 +82,10 @@ declare interface BotResponseChunk { declare type BotResponseMessage = Message & { context?: Record & { - data_points?: string[]; + data_points?: { + text?: string[]; + images?: string[]; + }; thoughts?: string; }; session_state?: Record; diff --git a/packages/search/src/lib/approaches/approach.ts b/packages/search/src/lib/approaches/approach.ts index 86a28e87..5d0d6772 100644 --- a/packages/search/src/lib/approaches/approach.ts +++ b/packages/search/src/lib/approaches/approach.ts @@ -19,7 +19,10 @@ export interface ApproachResponseChunk { export type ApproachResponseMessage = Message & { context?: Record & { - data_points?: string[]; + data_points?: { + text?: string[]; + images?: string[]; + }; thoughts?: string; }; session_state?: Record; diff --git a/packages/search/src/lib/approaches/ask-read-retrieve-read.ts b/packages/search/src/lib/approaches/ask-read-retrieve-read.ts index eef959cd..69caabdd 100644 --- a/packages/search/src/lib/approaches/ask-read-retrieve-read.ts +++ b/packages/search/src/lib/approaches/ask-read-retrieve-read.ts @@ -110,7 +110,9 @@ export class AskReadRetrieveRead extends ApproachBase implements AskApproach { content: answer, role: 'assistant' as const, context: { - data_points: searchResults, + data_points: { + text: searchResults, + }, thoughts: htmlTracer.getAndResetLog(), }, }, diff --git a/packages/search/src/lib/approaches/ask-retrieve-then-read.ts b/packages/search/src/lib/approaches/ask-retrieve-then-read.ts index 439d76dc..42ef38ff 100644 --- a/packages/search/src/lib/approaches/ask-retrieve-then-read.ts +++ b/packages/search/src/lib/approaches/ask-retrieve-then-read.ts @@ -79,7 +79,9 @@ export class AskRetrieveThenRead extends ApproachBase implements AskApproach { role: 'assistant' as const, content: chatCompletion.choices[0].message.content ?? '', context: { - data_points: results, + data_points: { + text: results, + }, thoughts: `Question:
${query}

Prompt:
${messageToDisplay.replace('\n', '
')}`, }, }, diff --git a/packages/search/src/lib/approaches/chat-read-retrieve-read.ts b/packages/search/src/lib/approaches/chat-read-retrieve-read.ts index 3c6e474e..a8e395d2 100644 --- a/packages/search/src/lib/approaches/chat-read-retrieve-read.ts +++ b/packages/search/src/lib/approaches/chat-read-retrieve-read.ts @@ -78,7 +78,9 @@ export class ChatReadRetrieveRead extends ApproachBase implements ChatApproach { content: chatContent, role: 'assistant', context: { - data_points: dataPoints, + data_points: { + text: dataPoints, + }, thoughts: thoughts, }, }, @@ -108,7 +110,7 @@ export class ChatReadRetrieveRead extends ApproachBase implements ChatApproach { content: chunk.choices[0].delta.content ?? '', role: 'assistant' as const, context: { - data_points: id === 0 ? dataPoints : undefined, + data_points: id === 0 ? { text: dataPoints } : undefined, thoughts: id === 0 ? thoughts : undefined, }, }, diff --git a/packages/search/src/plugins/schemas.ts b/packages/search/src/plugins/schemas.ts index f3e5d87a..88bc3dcd 100644 --- a/packages/search/src/plugins/schemas.ts +++ b/packages/search/src/plugins/schemas.ts @@ -59,8 +59,17 @@ export const messageSchema = { type: 'object', properties: { data_points: { - type: 'array', - items: { type: 'string' }, + type: 'object', + properties: { + text: { + type: 'array', + items: { type: 'string' }, + }, + images: { + type: 'array', + items: { type: 'string' }, + }, + }, }, thoughts: { type: 'string' }, }, diff --git a/tests/e2e/hars/default-ask-response.har b/tests/e2e/hars/default-ask-response.har index af6b31ee..0b906781 100644 --- a/tests/e2e/hars/default-ask-response.har +++ b/tests/e2e/hars/default-ask-response.har @@ -61,7 +61,7 @@ "content": { "size": -1, "mimeType": "application/json; charset=utf-8", - "text": "{\"choices\":[{\"index\":0,\"message\":{\"content\":\"Based on the search results, it seems that the process of searching and booking rentals on travel websites is similar to the general process mentioned earlier. The steps include entering destination, check-in and check-out dates, and number of guests, applying filters to narrow down options, browsing through listings, viewing listing details, making a booking, and handling payment securely. It also mentions the option to communicate with the host for any questions or special requests.\",\"role\":\"assistant\",\"context\":{\"data_points\":[\"support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.\",\"terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\",\"support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.\"],\"thoughts\":\"[chain/start] [1:chain:AgentExecutor] Entering chain

[agent/action] [1:chain:AgentExecutor] Agent selected action:
Question: How to search and book rentals?\\nThought: There are several ways to search and book rentals, depending on the type of rental you are looking for. Some common methods include using online rental platforms, contacting rental agencies directly, or using travel websites.\\nAction: \\n```\\n{\\n \\\"action\\\": \\\"CognitiveSearch\\\",\\n \\\"action_input\\\": \\\"how to search and book rentals\\\"\\n}\\n```\\n

[tool/run] [1:chain:AgentExecutor > 2:tool:DynamicTool]
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.

[agent/action] [1:chain:AgentExecutor] Agent selected action:
Based on the search results, it seems that there are multiple resources available on how to search and book rentals. The resources mention steps such as entering destination, check-in and check-out dates, and number of guests, applying filters to narrow down options, browsing through listings, viewing listing details, making a booking, and handling payment securely. It also mentions the option to communicate with the host for any questions or special requests. \\nAction: \\n```\\n{\\n \\\"action\\\": \\\"CognitiveSearch\\\",\\n \\\"action_input\\\": \\\"how to search and book rentals on travel websites\\\"\\n}\\n```\\n

[tool/run] [1:chain:AgentExecutor > 3:tool:DynamicTool]
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.

[chain/end] Finished chain
\"}}}],\"object\":\"chat.completion\"}" + "text": "{\"choices\":[{\"index\":0,\"message\":{\"content\":\"Based on the search results, it seems that the process of searching and booking rentals on travel websites is similar to the general process mentioned earlier. The steps include entering destination, check-in and check-out dates, and number of guests, applying filters to narrow down options, browsing through listings, viewing listing details, making a booking, and handling payment securely. It also mentions the option to communicate with the host for any questions or special requests.\",\"role\":\"assistant\",\"context\":{\"data_points\":{\"text\":[\"support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.\",\"terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\",\"support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.\"]},\"thoughts\":\"[chain/start] [1:chain:AgentExecutor] Entering chain

[agent/action] [1:chain:AgentExecutor] Agent selected action:
Question: How to search and book rentals?\\nThought: There are several ways to search and book rentals, depending on the type of rental you are looking for. Some common methods include using online rental platforms, contacting rental agencies directly, or using travel websites.\\nAction: \\n```\\n{\\n \\\"action\\\": \\\"CognitiveSearch\\\",\\n \\\"action_input\\\": \\\"how to search and book rentals\\\"\\n}\\n```\\n

[tool/run] [1:chain:AgentExecutor > 2:tool:DynamicTool]
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.

[agent/action] [1:chain:AgentExecutor] Agent selected action:
Based on the search results, it seems that there are multiple resources available on how to search and book rentals. The resources mention steps such as entering destination, check-in and check-out dates, and number of guests, applying filters to narrow down options, browsing through listings, viewing listing details, making a booking, and handling payment securely. It also mentions the option to communicate with the host for any questions or special requests. \\nAction: \\n```\\n{\\n \\\"action\\\": \\\"CognitiveSearch\\\",\\n \\\"action_input\\\": \\\"how to search and book rentals on travel websites\\\"\\n}\\n```\\n

[tool/run] [1:chain:AgentExecutor > 3:tool:DynamicTool]
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.

[chain/end] Finished chain
\"}}}],\"object\":\"chat.completion\"}" }, "headersSize": -1, "bodySize": -1, diff --git a/tests/e2e/hars/default-chat-response-nostream.har b/tests/e2e/hars/default-chat-response-nostream.har index 24f3f015..807e9f25 100644 --- a/tests/e2e/hars/default-chat-response-nostream.har +++ b/tests/e2e/hars/default-chat-response-nostream.har @@ -61,7 +61,7 @@ "content": { "size": -1, "mimeType": "application/json; charset=utf-8", - "text": "{\"choices\":[{\"index\":0,\"message\":{\"content\":\"To search and book rentals with Contoso Real Estate, follow these steps [support.md]:\\n1. Search for Rentals: Enter your destination, check-in and check-out dates, and the number of guests. Apply filters such as price range, property type, and amenities to narrow down your options.\\n2. View Listing Details: Click on a listing to view detailed information, including photos, property description, reviews, and host information.\\n3. Make a Booking: Click the \\\"Book Now\\\" button on the listing page. Review the booking details, including the total cost and house rules. Confirm your booking by providing payment information. Once the host accepts your booking, you'll receive a confirmation.\\n4. Payment: Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed.\\n5. Communication: You can communicate with the host through our messaging system for any questions or special requests.\\n\\n<>\\n<>\\n<>\",\"role\":\"assistant\",\"context\":{\"data_points\":[\"support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.\",\"support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.\",\"terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\"],\"thoughts\":\"Search query:
Search query: \\\"how to search and book rentals\\\"

Conversations:
system: Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base about terms of service, privacy policy, and questions about support requests.
Generate a search query based on the conversation and the new question.
Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.
Do not include any text inside [] or <<>> in the search query terms.
Do not include any special characters like '+'.
If the question is not in English, translate the question to English before generating the search query.
If you cannot generate a search query, return just the number 0.


assistant: Refund policy

user: can I get refunded if cannot travel?

assistant: Show support for payment errors

user: What happens if a payment error occurs?

user: Generate search query for: How to search and book rentals?

system: Assistant helps the Consto Real Estate company customers with support questions regarding terms of service, privacy policy, and questions about support requests. Be brief in your answers.
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.
Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example: [info1.txt]. Don't combine sources, list each source separately, for example: [info1.txt][info2.pdf].
Generate 3 very brief follow-up questions that the user would likely ask next.
Enclose the follow-up questions in double angle brackets. Example:
<>
<>
<>

Do no repeat questions that have already been asked.
Make sure the last question ends with \\\">>\\\".



user: How to search and book rentals?

Sources:
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\"}}}],\"object\":\"chat.completion\"}" + "text": "{\"choices\":[{\"index\":0,\"message\":{\"content\":\"To search and book rentals with Contoso Real Estate, follow these steps [support.md]:\\n1. Search for Rentals: Enter your destination, check-in and check-out dates, and the number of guests. Apply filters such as price range, property type, and amenities to narrow down your options.\\n2. View Listing Details: Click on a listing to view detailed information, including photos, property description, reviews, and host information.\\n3. Make a Booking: Click the \\\"Book Now\\\" button on the listing page. Review the booking details, including the total cost and house rules. Confirm your booking by providing payment information. Once the host accepts your booking, you'll receive a confirmation.\\n4. Payment: Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed.\\n5. Communication: You can communicate with the host through our messaging system for any questions or special requests.\\n\\n<>\\n<>\\n<>\",\"role\":\"assistant\",\"context\":{\"data_points\":{\"text\":[\"support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.\",\"support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.\",\"terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\"]},\"thoughts\":\"Search query:
Search query: \\\"how to search and book rentals\\\"

Conversations:
system: Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base about terms of service, privacy policy, and questions about support requests.
Generate a search query based on the conversation and the new question.
Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.
Do not include any text inside [] or <<>> in the search query terms.
Do not include any special characters like '+'.
If the question is not in English, translate the question to English before generating the search query.
If you cannot generate a search query, return just the number 0.


assistant: Refund policy

user: can I get refunded if cannot travel?

assistant: Show support for payment errors

user: What happens if a payment error occurs?

user: Generate search query for: How to search and book rentals?

system: Assistant helps the Consto Real Estate company customers with support questions regarding terms of service, privacy policy, and questions about support requests. Be brief in your answers.
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.
Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example: [info1.txt]. Don't combine sources, list each source separately, for example: [info1.txt][info2.pdf].
Generate 3 very brief follow-up questions that the user would likely ask next.
Enclose the follow-up questions in double angle brackets. Example:
<>
<>
<>

Do no repeat questions that have already been asked.
Make sure the last question ends with \\\">>\\\".



user: How to search and book rentals?

Sources:
support.md: [How to Search and Book Rentals](#how-to-search-and-book-rentals) 2. [How to Cancel a Confirmed Booking](#how-to-cancel-a-confirmed-booking) 3. [How to Contact Customer Support](#how-to-contact-customer-support) 4. [How to Report a Problem with a Listing](#how-to-report-a-problem-with-a-listing) 5. [How to Report a Problem with a Guest or Host](#how-to-report-a-problem-with-a-guest-or-host) 6. [How to Report a Safety Issue](#how-to-report-a-safety-issue) 7. [How to Report a Payment or Refund Issue](#how-to-report-a-payment-or-refund-issue) 8. [Guest or Host Rule Violations](#guest-or-host-rule-violations) 9. [Compensation for Damage](#compensation-for-damage) 10. [Payment Error Resolution](#payment-error-resolution) --- ## 1. How to Search and Book Rentals Contoso Real Estate offers a wide range of rental properties for your stay. Here's how to search and book rentals: 1. **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options.
support.md: **Search for Rentals:** - Enter your destination, check-in and check-out dates, and the number of guests. - Apply filters such as price range, property type, and amenities to narrow down your options. - Browse through the listings to find the perfect place for your stay. 2. **View Listing Details:** - Click on a listing to view detailed information, including photos, property description, reviews, and host information. 3. **Make a Booking:** - Click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including the total cost and house rules. - Confirm your booking by providing payment information. - Once the host accepts your booking, you'll receive a confirmation. 4. **Payment:** - Contoso Real Estate handles the payment process securely. You'll only be charged once your booking is confirmed. 5. **Communication:** - You can communicate with the host through our messaging system for any questions or special requests. --- ## 2. How to Cancel a Confirmed Booking Life happens, and sometimes you need to cancel a confirmed booking. Here's how to do it: 1.
terms-of-service.md: We aim to create a trusted community where hosts can share their spaces and guests can enjoy memorable experiences. ## 2. How to Search and Book Rentals ### 2.1 Creating an Account To search for and book rentals, users must create a Contoso Real Estate account. You must provide accurate and complete information during the registration process. Users are responsible for maintaining the confidentiality of their account credentials. ### 2.2 Browsing and Searching - Users can browse available rentals without an account. - Use our search filters to narrow down rental options based on your preferences. - Click on a rental listing to view details, including pricing, availability, and host information. ### 2.3 Booking a Rental - To book a rental, click the \\\"Book Now\\\" button on the listing page. - Review the booking details, including dates and pricing, before confirming the reservation. - Payment is processed securely through our platform. Guests will receive a booking confirmation email. ### 2.4 Guest Verification - Guests may be required to complete identity verification steps.\"}}}],\"object\":\"chat.completion\"}" }, "headersSize": -1, "bodySize": -1, diff --git a/tests/e2e/hars/error-chat-response-stream.har b/tests/e2e/hars/error-chat-response-stream.har index 04b4b33f..5a1dfff7 100644 --- a/tests/e2e/hars/error-chat-response-stream.har +++ b/tests/e2e/hars/error-chat-response-stream.har @@ -61,7 +61,7 @@ "content": { "size": -1, "mimeType": "application/x-ndjson", - "text": "{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\",\"context\":{\"data_points\":[],\"thoughts\":\"Here's how to do it: 1.\"}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"To\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" search\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" book\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" rentals\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":\"content_filter\"}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" on\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":\"stop\"}],\"object\":\"chat.completion.chunk\"}\n" + "text": "{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\",\"context\":{\"data_points\":{}},\"thoughts\":\"Here's how to do it: 1.\"}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"To\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" search\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" book\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" rentals\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":\"content_filter\"}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\" on\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":null}],\"object\":\"chat.completion.chunk\"}\n{\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\",\"context\":{}},\"finish_reason\":\"stop\"}],\"object\":\"chat.completion.chunk\"}\n" }, "headersSize": -1, "bodySize": -1,