Class: Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb
Overview
Request message for ConversationalSearchService.AnswerQuery method.
Defined Under Namespace
Classes: AnswerGenerationSpec, EndUserSpec, GroundingSpec, QueryUnderstandingSpec, RelatedQuestionsSpec, SafetySpec, SearchSpec, UserLabelsEntry
Instance Attribute Summary collapse
-
#answer_generation_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec
Answer generation specification.
-
#asynchronous_mode ⇒ ::Boolean
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#end_user_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec
Optional.
-
#grounding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec
Optional.
-
#query ⇒ ::Google::Cloud::DiscoveryEngine::V1::Query
Required.
-
#query_understanding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec
Query understanding specification.
-
#related_questions_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::RelatedQuestionsSpec
Related questions specification.
-
#safety_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec
Model specification.
-
#search_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec
Search specification.
-
#serving_config ⇒ ::String
Required.
-
#session ⇒ ::String
The session resource name.
-
#user_labels ⇒ ::Google::Protobuf::Map{::String => ::String}
The user labels applied to a resource must meet the following requirements:.
-
#user_pseudo_id ⇒ ::String
A unique identifier for tracking visitors.
Instance Attribute Details
#answer_generation_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec
Returns Answer generation specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#asynchronous_mode ⇒ ::Boolean
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: This field is deprecated. Streaming Answer API will be supported.
Asynchronous mode control.
If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#end_user_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec
Returns Optional. End user specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#grounding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec
Returns Optional. Grounding specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#query ⇒ ::Google::Cloud::DiscoveryEngine::V1::Query
Returns Required. Current user query.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#query_understanding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec
Returns Query understanding specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#related_questions_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::RelatedQuestionsSpec
Returns Related questions specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#safety_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec
Returns Model specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#search_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec
Returns Search specification.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#serving_config ⇒ ::String
Returns Required. The resource name of the Search serving config, such as
projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config
,
or
projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config
.
This field is used to identify the serving configuration name, set
of models used to make the search.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#session ⇒ ::String
Returns The session resource name. Not required.
When session field is not set, the API is in sessionless mode.
We support auto session mode: users can use the wildcard symbol -
as
session ID. A new ID will be automatically generated and assigned.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#user_labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns The user labels applied to a resource must meet the following requirements:
- Each resource can have multiple labels, up to a maximum of 64.
- Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character.
See Google Cloud Document for more details.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#user_pseudo_id ⇒ ::String
Returns A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.
This field should NOT have a fixed value such as unknown_visitor
.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT
error is returned.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb', line 315 class AnswerQueryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety specification. # There are two use cases: # 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold # will be applied for all categories. # 2. when safety_spec.enable is set and some safety_settings are set, only # specified safety_settings are applied. # @!attribute [rw] enable # @return [::Boolean] # Enable the safety filtering on the answer response. It is false by # default. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>] # Optional. Safety settings. # This settings are effective only when the safety_spec.enable is true. class SafetySpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety settings. # @!attribute [rw] category # @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory] # Required. Harm category. # @!attribute [rw] threshold # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting::HarmBlockThreshold] # Required. The harm block threshold. class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end end end # Related questions specification. # @!attribute [rw] enable # @return [::Boolean] # Enable related questions feature if true. class RelatedQuestionsSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding specification. # @!attribute [rw] include_grounding_supports # @return [::Boolean] # Optional. Specifies whether to include grounding_supports in the answer. # The default value is `false`. # # When this field is set to `true`, returned answer will have # `grounding_score` and will contain GroundingSupports for each claim. # @!attribute [rw] filtering_level # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::GroundingSpec::FilteringLevel] # Optional. Specifies whether to enable the filtering based on grounding # score and at what level. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Level to filter based on answer grounding. module FilteringLevel # Default is no filter FILTERING_LEVEL_UNSPECIFIED = 0 # Filter answers based on a low threshold. FILTERING_LEVEL_LOW = 1 # Filter answers based on a high threshold. FILTERING_LEVEL_HIGH = 2 end end # Answer generation specification. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec] # Answer generation model specification. # @!attribute [rw] prompt_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec] # Answer generation prompt specification. # @!attribute [rw] include_citations # @return [::Boolean] # Specifies whether to include citation metadata in the answer. The default # value is `false`. # @!attribute [rw] answer_language_code # @return [::String] # Language code for Answer. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # Note: This is an experimental feature. # @!attribute [rw] ignore_adversarial_query # @return [::Boolean] # Specifies whether to filter out adversarial queries. The default value # is `false`. # # Google employs search-query classification to detect adversarial # queries. No answer is returned if the search query is classified as an # adversarial query. For example, a user might ask a question regarding # negative comments about the company or submit a query designed to # generate unsafe, policy-violating output. If this field is set to # `true`, we skip generating answers for adversarial queries and return # fallback messages instead. # @!attribute [rw] ignore_non_answer_seeking_query # @return [::Boolean] # Specifies whether to filter out queries that are not answer-seeking. # The default value is `false`. # # Google employs search-query classification to detect answer-seeking # queries. No answer is returned if the search query is classified as a # non-answer seeking query. If this field is set to `true`, we skip # generating answers for non-answer seeking queries and return # fallback messages instead. # @!attribute [rw] ignore_low_relevant_content # @return [::Boolean] # Specifies whether to filter out queries that have low relevance. # # If this field is set to `false`, all search results are used regardless # of relevance to generate answers. If set to `true` or unset, the behavior # will be determined automatically by the service. # @!attribute [rw] ignore_jail_breaking_query # @return [::Boolean] # Optional. Specifies whether to filter out jail-breaking queries. The # default value is `false`. # # Google employs search-query classification to detect jail-breaking # queries. No summary is returned if the search query is classified as a # jail-breaking query. A user might add instructions to the query to # change the tone, style, language, content of the answer, or ask the # model to act as a different entity, e.g. "Reply in the tone of a # competing company's CEO". If this field is set to `true`, we skip # generating summaries for jail-breaking queries and return fallback # messages instead. class AnswerGenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Answer Generation Model specification. # @!attribute [rw] model_version # @return [::String] # Model version. If not set, it will use the default stable model. # Allowed values are: stable, preview. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Answer generation prompt specification. # @!attribute [rw] preamble # @return [::String] # Customized preamble. class PromptSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Search specification. # @!attribute [rw] search_params # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams] # Search parameters. # # Note: The following fields are mutually exclusive: `search_params`, `search_result_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] search_result_list # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList] # Search result list. # # Note: The following fields are mutually exclusive: `search_result_list`, `search_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search parameters. # @!attribute [rw] max_return_results # @return [::Integer] # Number of search results to return. # The default value is 10. # @!attribute [rw] filter # @return [::String] # The filter syntax consists of an expression language for constructing # a predicate from one or more fields of the documents being filtered. # Filter expression is case-sensitive. This will be used to filter # search results which may affect the Answer response. # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # # Filtering in Vertex AI Search is done by mapping the LHS filter key # to a key property defined in the Vertex AI Search backend -- this # mapping is defined by the customer in their schema. For example a # media customers might have a field 'name' in their schema. In this # case the filter would look like this: filter --> name:'ANY("king # kong")' # # For more information about filtering including syntax and filter # operators, see # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) # @!attribute [rw] boost_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec] # Boost specification to boost certain documents in search results which # may affect the answer query response. For more information on boosting, # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) # @!attribute [rw] order_by # @return [::String] # The order in which documents are returned. Documents can be ordered # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} # object. Leave it unset if ordered by relevance. `order_by` expression # is case-sensitive. For more information on ordering, see # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) # # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. # @!attribute [rw] search_result_mode # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode] # Specifies the search result mode. If unspecified, the # search result mode defaults to `DOCUMENTS`. # See [parse and chunk # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) # @!attribute [rw] data_store_specs # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>] # Specs defining dataStores to filter on in a search call and # configurations for those dataStores. This is only considered for # engines with multiple dataStores use case. For single dataStore within # an engine, they should use the specs at the top level. class SearchParams include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Search result list. # @!attribute [rw] search_results # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>] # Search results. class SearchResultList include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Search result. # @!attribute [rw] unstructured_document_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo] # Unstructured document information. # # Note: The following fields are mutually exclusive: `unstructured_document_info`, `chunk_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo] # Chunk information. # # Note: The following fields are mutually exclusive: `chunk_info`, `unstructured_document_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Unstructured document information. # @!attribute [rw] document # @return [::String] # Document resource name. # @!attribute [rw] uri # @return [::String] # URI for the document. # @!attribute [rw] title # @return [::String] # Title. # @!attribute [rw] document_contexts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>] # List of document contexts. The content will be used for Answer # Generation. This is supposed to be the main content of the document # that can be long and comprehensive. # @!attribute [rw] extractive_segments # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>] # List of extractive segments. # @!attribute [rw] extractive_answers # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>] # Deprecated: This field is deprecated and will have no effect on # the Answer generation. # Please use document_contexts and extractive_segments fields. # List of extractive answers. class UnstructuredDocumentInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document context. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Document content to be used for answer generation. class DocumentContext include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive segment. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) # Answer generation will only use it if document_contexts is empty. # This is supposed to be shorter snippets. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive segment content. class ExtractiveSegment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Extractive answer. # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) # @!attribute [rw] page_identifier # @return [::String] # Page identifier. # @!attribute [rw] content # @return [::String] # Extractive answer content. class ExtractiveAnswer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Chunk information. # @!attribute [rw] chunk # @return [::String] # Chunk resource name. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of the # current chunk. # @!attribute [rw] uri # @return [::String] # Uri of the document. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end # Query understanding specification. # @!attribute [rw] query_classification_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec] # Query classification specification. # @!attribute [rw] query_rephraser_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec] # Query rephraser specification. # @!attribute [rw] disable_spell_correction # @return [::Boolean] # Optional. Whether to disable spell correction. # The default value is `false`. class QueryUnderstandingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification specification. # @!attribute [rw] types # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>] # Enabled query classification types. class QueryClassificationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query classification types. module Type # Unspecified query classification type. TYPE_UNSPECIFIED = 0 # Adversarial query classification type. ADVERSARIAL_QUERY = 1 # Non-answer-seeking query classification type, for chit chat. NON_ANSWER_SEEKING_QUERY = 2 # Jail-breaking query classification type. JAIL_BREAKING_QUERY = 3 # Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4 end end # Query rephraser specification. # @!attribute [rw] disable # @return [::Boolean] # Disable query rephraser. # @!attribute [rw] max_rephrase_steps # @return [::Integer] # Max rephrase steps. # The max number is 5 steps. # If not set or set to < 1, it will be set to 1 by default. # @!attribute [rw] model_spec # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec] # Optional. Query Rephraser Model specification. class QueryRephraserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query Rephraser Model specification. # @!attribute [rw] model_type # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec::ModelSpec::ModelType] # Optional. Enabled query rephraser model type. If not set, it will use # LARGE by default. class ModelSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query rephraser types. Currently only supports single-hop # (max_rephrase_steps = 1) model selections. For multi-hop # (max_rephrase_steps > 1), there is only one default model. module ModelType # Unspecified model type. MODEL_TYPE_UNSPECIFIED = 0 # Small query rephraser model. Gemini 1.0 XS model. SMALL = 1 # Large query rephraser model. Gemini 1.0 Pro model. LARGE = 2 end end end end # End user specification. # @!attribute [rw] end_user_metadata # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData>] # Optional. End user metadata. class EndUserSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # End user metadata. # @!attribute [rw] chunk_info # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo] # Chunk information. class EndUserMetaData include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk information. # @!attribute [rw] content # @return [::String] # Chunk textual content. It is limited to 8000 characters. # @!attribute [rw] document_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::EndUserSpec::EndUserMetaData::ChunkInfo::DocumentMetadata] # Metadata of the document from the current chunk. class ChunkInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Document metadata contains the information of the document of # the current chunk. # @!attribute [rw] title # @return [::String] # Title of the document. class DocumentMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |