Property | Description | Default | Type | Required |
---|---|---|---|---|
mapping_config | A configuration map of properties to extract from the results. | - | Union[string, None] | No |
mapping_config={ "KEYWORD": f"jsonpath.format.for.intermediate.and.final.objects" "CONTENT": f"$.{SEARCH_STAGE_NAME}.hits[*].data.overview", "QUESTION": f"$.q", "MOVIE_URL": f"$.{SEARCH_STAGE_NAME}.hits[*].data.url", "MOVIE_TITLE": f"$.{SEARCH_STAGE_NAME}.hits[*].data.title", "MOVIE_RELEASE_DATE": f"$.{SEARCH_STAGE_NAME}.hits[*].data.release_date" }
This stage does not require any specific intermediate parameters, nevertheless, you can use any value in the intermediate or final objects as long as it matches the jsonpath pattern provided.
Remember that the intermediate can be fill with either other stages or the original request body that trigger the pipeline, making this essentially REST API parameters.
_search_mapping = PromptMappingStage( name="PromptMapping", mapping_config={ "CONTENT": f"$.{SEARCH_STAGE_NAME}.hits[*].data.overview", "QUESTION": f"$.q", "MOVIE_URL": f"$.{SEARCH_STAGE_NAME}.hits[*].data.url", "MOVIE_TITLE": f"$.{SEARCH_STAGE_NAME}.hits[*].data.title", "MOVIE_RELEASE_DATE": f"$.{SEARCH_STAGE_NAME}.hits[*].data.release_date" } )