From 55b0961b98bf22b44fc6fd45c9ef0fc583c14f6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:46:36 -0700 Subject: [PATCH] Upgrade openai, openai-messages-token-helper, for gpt-4o-mini support (#1893) * Bump the python-requirements group across 1 directory with 43 updates Bumps the python-requirements group with 43 updates in the / directory: | Package | From | To | | --- | --- | --- | | [aiohttp](https://github.com/aio-libs/aiohttp) | `3.9.5` | `3.10.1` | | [attrs](https://github.com/sponsors/hynek) | `23.2.0` | `24.2.0` | | [azure-monitor-opentelemetry](https://github.com/Azure/azure-sdk-for-python) | `1.6.0` | `1.6.1` | | [azure-monitor-opentelemetry-exporter](https://github.com/Azure/azure-sdk-for-python) | `1.0.0b27` | `1.0.0b28` | | [azure-storage-blob](https://github.com/Azure/azure-sdk-for-python) | `12.21.0` | `12.22.0` | | [cffi](https://github.com/python-cffi/cffi) | `1.16.0` | `1.17.0` | | [fixedint](https://github.com/nneonneo/fixedint) | `0.1.6` | `0.2.0` | | [importlib-metadata](https://github.com/python/importlib_metadata) | `7.1.0` | `8.2.0` | | [microsoft-kiota-serialization-json](https://github.com/microsoft/kiota) | `1.2.0` | `1.3.0` | | [msgraph-sdk](https://github.com/microsoftgraph/msgraph-sdk-python) | `1.1.0` | `1.5.4` | | [openai](https://github.com/openai/openai-python) | `1.37.0` | `1.40.1` | | [openai-messages-token-helper](https://github.com/pamelafox/openai-messages-token-helper) | `0.1.5` | `0.1.8` | | [opentelemetry-api](https://github.com/open-telemetry/opentelemetry-python) | `1.25.0` | `1.26.0` | | [opentelemetry-instrumentation](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-aiohttp-client](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-asgi](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-dbapi](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-django](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-fastapi](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-flask](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-httpx](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-openai](https://github.com/traceloop/openllmetry) | `0.25.5` | `0.26.5` | | [opentelemetry-instrumentation-psycopg2](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-requests](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-urllib](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-urllib3](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-instrumentation-wsgi](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [opentelemetry-sdk](https://github.com/open-telemetry/opentelemetry-python) | `1.25.0` | `1.26.0` | | [opentelemetry-semantic-conventions](https://github.com/open-telemetry/opentelemetry-python) | `0.46b0` | `0.47b0` | | opentelemetry-semantic-conventions-ai | `0.3.4` | `0.4.1` | | [opentelemetry-util-http](https://github.com/open-telemetry/opentelemetry-python-contrib) | `0.46b0` | `0.47b0` | | [psutil](https://github.com/giampaolo/psutil) | `5.9.8` | `6.0.0` | | [pydantic-core](https://github.com/pydantic/pydantic-core) | `2.20.1` | `2.21.0` | | [pyjwt[crypto]](https://github.com/jpadilla/pyjwt) | `2.8.0` | `2.9.0` | | [pymupdf](https://github.com/pymupdf/pymupdf) | `1.24.7` | `1.24.9` | | [pymupdfb](https://github.com/pymupdf/pymupdf) | `1.24.6` | `1.24.9` | | [regex](https://github.com/mrabarnett/mrab-regex) | `2024.5.15` | `2024.7.24` | | [std-uritemplate](https://github.com/std-uritemplate/std-uritemplate) | `1.0.3` | `1.0.5` | | [tenacity](https://github.com/jd/tenacity) | `8.5.0` | `9.0.0` | | [time-machine](https://github.com/adamchainz/time-machine) | `2.14.2` | `2.15.0` | | [tqdm](https://github.com/tqdm/tqdm) | `4.66.4` | `4.66.5` | | [types-html5lib](https://github.com/python/typeshed) | `1.1.11.20240228` | `1.1.11.20240806` | | [uvicorn](https://github.com/encode/uvicorn) | `0.30.3` | `0.30.5` | Updates `aiohttp` from 3.9.5 to 3.10.1 - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.5...v3.10.1) Updates `attrs` from 23.2.0 to 24.2.0 - [Commits](https://github.com/sponsors/hynek/commits) Updates `azure-monitor-opentelemetry` from 1.6.0 to 1.6.1 - [Release notes](https://github.com/Azure/azure-sdk-for-python/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md) - [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-monitor-opentelemetry_1.6.0...azure-monitor-opentelemetry_1.6.1) Updates `azure-monitor-opentelemetry-exporter` from 1.0.0b27 to 1.0.0b28 - [Release notes](https://github.com/Azure/azure-sdk-for-python/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md) - [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-monitor-opentelemetry-exporter_1.0.0b27...azure-monitor-opentelemetry-exporter_1.0.0b28) Updates `azure-storage-blob` from 12.21.0 to 12.22.0 - [Release notes](https://github.com/Azure/azure-sdk-for-python/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/esrp_release.md) - [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-storage-blob_12.21.0...azure-storage-blob_12.22.0) Updates `cffi` from 1.16.0 to 1.17.0 - [Release notes](https://github.com/python-cffi/cffi/releases) - [Commits](https://github.com/python-cffi/cffi/compare/v1.16.0...v1.17.0) Updates `fixedint` from 0.1.6 to 0.2.0 - [Changelog](https://github.com/nneonneo/fixedint/blob/master/CHANGES) - [Commits](https://github.com/nneonneo/fixedint/compare/v0.1.6...v0.2.0) Updates `importlib-metadata` from 7.1.0 to 8.2.0 - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v7.1.0...v8.2.0) Updates `microsoft-kiota-serialization-json` from 1.2.0 to 1.3.0 - [Release notes](https://github.com/microsoft/kiota/releases) - [Changelog](https://github.com/microsoft/kiota/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota/compare/v1.2.0...v1.3.0) Updates `msgraph-sdk` from 1.1.0 to 1.5.4 - [Release notes](https://github.com/microsoftgraph/msgraph-sdk-python/releases) - [Changelog](https://github.com/microsoftgraph/msgraph-sdk-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoftgraph/msgraph-sdk-python/compare/v1.1.0...v1.5.4) Updates `openai` from 1.37.0 to 1.40.1 - [Release notes](https://github.com/openai/openai-python/releases) - [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/openai/openai-python/compare/v1.37.0...v1.40.1) Updates `openai-messages-token-helper` from 0.1.5 to 0.1.8 - [Changelog](https://github.com/pamelafox/openai-messages-token-helper/blob/main/CHANGELOG.md) - [Commits](https://github.com/pamelafox/openai-messages-token-helper/commits) Updates `opentelemetry-api` from 1.25.0 to 1.26.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python/compare/v1.25.0...v1.26.0) Updates `opentelemetry-instrumentation` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-aiohttp-client` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-asgi` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-dbapi` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-django` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-fastapi` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-flask` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-httpx` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-openai` from 0.25.5 to 0.26.5 - [Release notes](https://github.com/traceloop/openllmetry/releases) - [Changelog](https://github.com/traceloop/openllmetry/blob/main/CHANGELOG.md) - [Commits](https://github.com/traceloop/openllmetry/compare/0.25.5...0.26.5) Updates `opentelemetry-instrumentation-psycopg2` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-requests` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-urllib` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-urllib3` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-instrumentation-wsgi` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `opentelemetry-sdk` from 1.25.0 to 1.26.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python/compare/v1.25.0...v1.26.0) Updates `opentelemetry-semantic-conventions` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python/commits) Updates `opentelemetry-semantic-conventions-ai` from 0.3.4 to 0.4.1 Updates `opentelemetry-util-http` from 0.46b0 to 0.47b0 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) Updates `psutil` from 5.9.8 to 6.0.0 - [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst) - [Commits](https://github.com/giampaolo/psutil/compare/release-5.9.8...release-6.0.0) Updates `pydantic-core` from 2.20.1 to 2.21.0 - [Release notes](https://github.com/pydantic/pydantic-core/releases) - [Commits](https://github.com/pydantic/pydantic-core/compare/v2.20.1...v2.21.0) Updates `pyjwt[crypto]` from 2.8.0 to 2.9.0 - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](https://github.com/jpadilla/pyjwt/compare/2.8.0...2.9.0) Updates `pymupdf` from 1.24.7 to 1.24.9 - [Release notes](https://github.com/pymupdf/pymupdf/releases) - [Changelog](https://github.com/pymupdf/PyMuPDF/blob/main/changes.txt) - [Commits](https://github.com/pymupdf/pymupdf/compare/1.24.7...1.24.9) Updates `pymupdfb` from 1.24.6 to 1.24.9 - [Release notes](https://github.com/pymupdf/pymupdf/releases) - [Changelog](https://github.com/pymupdf/PyMuPDF/blob/main/changes.txt) - [Commits](https://github.com/pymupdf/pymupdf/compare/1.24.6...1.24.9) Updates `regex` from 2024.5.15 to 2024.7.24 - [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt) - [Commits](https://github.com/mrabarnett/mrab-regex/compare/2024.5.15...2024.7.24) Updates `std-uritemplate` from 1.0.3 to 1.0.5 - [Release notes](https://github.com/std-uritemplate/std-uritemplate/releases) - [Commits](https://github.com/std-uritemplate/std-uritemplate/compare/1.0.3...1.0.5) Updates `tenacity` from 8.5.0 to 9.0.0 - [Release notes](https://github.com/jd/tenacity/releases) - [Commits](https://github.com/jd/tenacity/compare/8.5.0...9.0.0) Updates `time-machine` from 2.14.2 to 2.15.0 - [Changelog](https://github.com/adamchainz/time-machine/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamchainz/time-machine/compare/2.14.2...2.15.0) Updates `tqdm` from 4.66.4 to 4.66.5 - [Release notes](https://github.com/tqdm/tqdm/releases) - [Commits](https://github.com/tqdm/tqdm/compare/v4.66.4...v4.66.5) Updates `types-html5lib` from 1.1.11.20240228 to 1.1.11.20240806 - [Commits](https://github.com/python/typeshed/commits) Updates `uvicorn` from 0.30.3 to 0.30.5 - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/uvicorn/compare/0.30.3...0.30.5) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: attrs dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-requirements - dependency-name: azure-monitor-opentelemetry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: azure-monitor-opentelemetry-exporter dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: azure-storage-blob dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: cffi dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: fixedint dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-requirements - dependency-name: microsoft-kiota-serialization-json dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: msgraph-sdk dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: openai dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: openai-messages-token-helper dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: opentelemetry-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-aiohttp-client dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-asgi dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-dbapi dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-django dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-fastapi dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-flask dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-httpx dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-openai dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-psycopg2 dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-requests dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-urllib dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-urllib3 dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-instrumentation-wsgi dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-sdk dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: opentelemetry-semantic-conventions dependency-type: direct:production dependency-group: python-requirements - dependency-name: opentelemetry-semantic-conventions-ai dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: opentelemetry-util-http dependency-type: direct:production dependency-group: python-requirements - dependency-name: psutil dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-requirements - dependency-name: pydantic-core dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: pyjwt[crypto] dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: pymupdf dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: pymupdfb dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: std-uritemplate dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: tenacity dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-requirements - dependency-name: time-machine dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-requirements - dependency-name: tqdm dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: types-html5lib dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements - dependency-name: uvicorn dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-requirements ... Signed-off-by: dependabot[bot] * Update requirements * Update for latest OpenAI SDK, dont pass down unneeded bits --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pamela Fox --- app/backend/approaches/chatapproach.py | 29 +++--- app/backend/approaches/retrievethenread.py | 33 +++---- .../approaches/retrievethenreadvision.py | 31 +++---- app/backend/requirements.txt | 89 ++++++++++--------- .../test_ask_rtr_hybrid/client0/result.json | 4 +- .../test_ask_rtr_hybrid/client1/result.json | 4 +- .../test_ask_rtr_text/client0/result.json | 4 +- .../test_ask_rtr_text/client1/result.json | 4 +- .../auth_client0/result.json | 4 +- .../auth_public_documents_client0/result.json | 4 +- .../client0/result.json | 4 +- .../client1/result.json | 4 +- .../client0/result.json | 4 +- .../client1/result.json | 4 +- .../test_ask_vision/client0/result.json | 4 +- .../test_ask_vision/client1/result.json | 4 +- .../test_chat_followup/client0/result.json | 7 +- .../test_chat_followup/client1/result.json | 7 +- .../test_chat_hybrid/client0/result.json | 7 +- .../test_chat_hybrid/client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../test_chat_seed/client0/result.json | 7 +- .../test_chat_seed/client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.jsonlines | 4 +- .../client1/result.jsonlines | 4 +- .../client0/result.jsonlines | 4 +- .../client1/result.jsonlines | 4 +- .../client0/result.jsonlines | 4 +- .../client1/result.jsonlines | 4 +- .../auth_client0/result.jsonlines | 4 +- .../client0/result.jsonlines | 4 +- .../client1/result.jsonlines | 4 +- .../test_chat_text/client0/result.json | 7 +- .../test_chat_text/client1/result.json | 7 +- .../auth_client0/result.json | 7 +- .../auth_public_documents_client0/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../test_chat_vector/client0/result.json | 7 +- .../test_chat_vector/client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../test_chat_vision/client0/result.json | 7 +- .../test_chat_vision/client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- .../client0/result.json | 7 +- .../client1/result.json | 7 +- 63 files changed, 167 insertions(+), 365 deletions(-) diff --git a/app/backend/approaches/chatapproach.py b/app/backend/approaches/chatapproach.py index 2b133eca1a..ea1857da3b 100644 --- a/app/backend/approaches/chatapproach.py +++ b/app/backend/approaches/chatapproach.py @@ -75,7 +75,9 @@ def get_search_query(self, chat_completion: ChatCompletion, user_query: str): return query_text return user_query - def extract_followup_questions(self, content: str): + def extract_followup_questions(self, content: Optional[str]): + if content is None: + return content, [] return content.split("<<")[0], re.findall(r"<<([^>>]+)>>", content) async def run_without_streaming( @@ -89,15 +91,17 @@ async def run_without_streaming( messages, overrides, auth_claims, should_stream=False ) chat_completion_response: ChatCompletion = await chat_coroutine - chat_resp = chat_completion_response.model_dump() # Convert to dict to make it JSON serializable - chat_resp = chat_resp["choices"][0] - chat_resp["context"] = extra_info + content = chat_completion_response.choices[0].message.content + role = chat_completion_response.choices[0].message.role if overrides.get("suggest_followup_questions"): - content, followup_questions = self.extract_followup_questions(chat_resp["message"]["content"]) - chat_resp["message"]["content"] = content - chat_resp["context"]["followup_questions"] = followup_questions - chat_resp["session_state"] = session_state - return chat_resp + content, followup_questions = self.extract_followup_questions(content) + extra_info["followup_questions"] = followup_questions + chat_app_response = { + "message": {"content": content, "role": role}, + "context": extra_info, + "session_state": session_state, + } + return chat_app_response async def run_with_streaming( self, @@ -117,7 +121,12 @@ async def run_with_streaming( # "2023-07-01-preview" API version has a bug where first response has empty choices event = event_chunk.model_dump() # Convert pydantic model to dict if event["choices"]: - completion = {"delta": event["choices"][0]["delta"]} + completion = { + "delta": { + "content": event["choices"][0]["delta"].get("content"), + "role": event["choices"][0]["delta"]["role"], + } + } # if event contains << and not >>, it is start of follow-up question, truncate content = completion["delta"].get("content") content = content or "" # content may either not exist in delta, or explicitly be None diff --git a/app/backend/approaches/retrievethenread.py b/app/backend/approaches/retrievethenread.py index 93c3aec4eb..9a5b11c327 100644 --- a/app/backend/approaches/retrievethenread.py +++ b/app/backend/approaches/retrievethenread.py @@ -124,17 +124,15 @@ async def run( max_tokens=self.chatgpt_token_limit - response_token_limit, ) - chat_completion = ( - await self.openai_client.chat.completions.create( - # Azure OpenAI takes the deployment name as the model name - model=self.chatgpt_deployment if self.chatgpt_deployment else self.chatgpt_model, - messages=updated_messages, - temperature=overrides.get("temperature", 0.3), - max_tokens=response_token_limit, - n=1, - seed=seed, - ) - ).model_dump() + chat_completion = await self.openai_client.chat.completions.create( + # Azure OpenAI takes the deployment name as the model name + model=self.chatgpt_deployment if self.chatgpt_deployment else self.chatgpt_model, + messages=updated_messages, + temperature=overrides.get("temperature", 0.3), + max_tokens=response_token_limit, + n=1, + seed=seed, + ) data_points = {"text": sources_content} extra_info = { @@ -168,8 +166,11 @@ async def run( ], } - completion = {} - completion["message"] = chat_completion["choices"][0]["message"] - completion["context"] = extra_info - completion["session_state"] = session_state - return completion + return { + "message": { + "content": chat_completion.choices[0].message.content, + "role": chat_completion.choices[0].message.role, + }, + "context": extra_info, + "session_state": session_state, + } diff --git a/app/backend/approaches/retrievethenreadvision.py b/app/backend/approaches/retrievethenreadvision.py index b469a9c213..3c09a0bd83 100644 --- a/app/backend/approaches/retrievethenreadvision.py +++ b/app/backend/approaches/retrievethenreadvision.py @@ -142,16 +142,14 @@ async def run( new_user_content=user_content, max_tokens=self.gpt4v_token_limit - response_token_limit, ) - chat_completion = ( - await self.openai_client.chat.completions.create( - model=self.gpt4v_deployment if self.gpt4v_deployment else self.gpt4v_model, - messages=updated_messages, - temperature=overrides.get("temperature", 0.3), - max_tokens=response_token_limit, - n=1, - seed=seed, - ) - ).model_dump() + chat_completion = await self.openai_client.chat.completions.create( + model=self.gpt4v_deployment if self.gpt4v_deployment else self.gpt4v_model, + messages=updated_messages, + temperature=overrides.get("temperature", 0.3), + max_tokens=response_token_limit, + n=1, + seed=seed, + ) data_points = { "text": sources_content, @@ -190,8 +188,11 @@ async def run( ], } - completion = {} - completion["message"] = chat_completion["choices"][0]["message"] - completion["context"] = extra_info - completion["session_state"] = session_state - return completion + return { + "message": { + "content": chat_completion.choices[0].message.content, + "role": chat_completion.choices[0].message.role, + }, + "context": extra_info, + "session_state": session_state, + } diff --git a/app/backend/requirements.txt b/app/backend/requirements.txt index 59900be6c5..e4b592d5fd 100644 --- a/app/backend/requirements.txt +++ b/app/backend/requirements.txt @@ -6,7 +6,9 @@ # aiofiles==24.1.0 # via quart -aiohttp==3.9.5 +aiohappyeyeballs==2.3.5 + # via aiohttp +aiohttp==3.10.1 # via # -r requirements.in # microsoft-kiota-authentication-azure @@ -20,7 +22,7 @@ anyio==4.4.0 # openai asgiref==3.8.1 # via opentelemetry-instrumentation-asgi -attrs==23.2.0 +attrs==24.2.0 # via aiohttp azure-ai-documentintelligence==1.0.0b3 # via -r requirements.in @@ -46,13 +48,13 @@ azure-identity==1.17.1 # via # -r requirements.in # msgraph-sdk -azure-monitor-opentelemetry==1.6.0 +azure-monitor-opentelemetry==1.6.1 # via -r requirements.in -azure-monitor-opentelemetry-exporter==1.0.0b27 +azure-monitor-opentelemetry-exporter==1.0.0b28 # via azure-monitor-opentelemetry azure-search-documents==11.6.0b1 # via -r requirements.in -azure-storage-blob==12.21.0 +azure-storage-blob==12.22.0 # via # -r requirements.in # azure-storage-file-datalake @@ -70,7 +72,7 @@ certifi==2024.7.4 # httpx # msrest # requests -cffi==1.16.0 +cffi==1.17.0 # via cryptography charset-normalizer==3.3.2 # via requests @@ -87,7 +89,9 @@ cryptography==43.0.0 # msal # pyjwt deprecated==1.2.14 - # via opentelemetry-api + # via + # opentelemetry-api + # opentelemetry-semantic-conventions distro==1.9.0 # via openai fixedint==0.1.6 @@ -127,7 +131,7 @@ idna==3.7 # httpx # requests # yarl -importlib-metadata==7.1.0 +importlib-metadata==8.0.0 # via # opentelemetry-api # opentelemetry-instrumentation-flask @@ -146,6 +150,8 @@ jinja2==3.1.4 # via # flask # quart +jiter==0.5.0 + # via openai markupsafe==2.1.5 # via # jinja2 @@ -167,7 +173,7 @@ microsoft-kiota-http==1.3.2 # via # msgraph-core # msgraph-sdk -microsoft-kiota-serialization-json==1.2.0 +microsoft-kiota-serialization-json==1.3.0 # via msgraph-sdk microsoft-kiota-serialization-text==1.0.0 # via msgraph-sdk @@ -192,13 +198,13 @@ numpy==2.0.1 # via -r requirements.in oauthlib==3.2.2 # via requests-oauthlib -openai==1.37.0 +openai==1.40.1 # via # -r requirements.in # openai-messages-token-helper -openai-messages-token-helper==0.1.5 +openai-messages-token-helper==0.1.9 # via -r requirements.in -opentelemetry-api==1.25.0 +opentelemetry-api==1.26.0 # via # azure-core-tracing-opentelemetry # azure-monitor-opentelemetry-exporter @@ -221,7 +227,7 @@ opentelemetry-api==1.25.0 # opentelemetry-instrumentation-wsgi # opentelemetry-sdk # opentelemetry-semantic-conventions -opentelemetry-instrumentation==0.46b0 +opentelemetry-instrumentation==0.47b0 # via # opentelemetry-instrumentation-aiohttp-client # opentelemetry-instrumentation-asgi @@ -236,41 +242,41 @@ opentelemetry-instrumentation==0.46b0 # opentelemetry-instrumentation-urllib # opentelemetry-instrumentation-urllib3 # opentelemetry-instrumentation-wsgi -opentelemetry-instrumentation-aiohttp-client==0.46b0 +opentelemetry-instrumentation-aiohttp-client==0.47b0 # via -r requirements.in -opentelemetry-instrumentation-asgi==0.46b0 +opentelemetry-instrumentation-asgi==0.47b0 # via # -r requirements.in # opentelemetry-instrumentation-fastapi -opentelemetry-instrumentation-dbapi==0.46b0 +opentelemetry-instrumentation-dbapi==0.47b0 # via opentelemetry-instrumentation-psycopg2 -opentelemetry-instrumentation-django==0.46b0 +opentelemetry-instrumentation-django==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-fastapi==0.46b0 +opentelemetry-instrumentation-fastapi==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-flask==0.46b0 +opentelemetry-instrumentation-flask==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-httpx==0.46b0 +opentelemetry-instrumentation-httpx==0.47b0 # via -r requirements.in -opentelemetry-instrumentation-openai==0.25.5 +opentelemetry-instrumentation-openai==0.26.5 # via -r requirements.in -opentelemetry-instrumentation-psycopg2==0.46b0 +opentelemetry-instrumentation-psycopg2==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-requests==0.46b0 +opentelemetry-instrumentation-requests==0.47b0 # via # -r requirements.in # azure-monitor-opentelemetry -opentelemetry-instrumentation-urllib==0.46b0 +opentelemetry-instrumentation-urllib==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-urllib3==0.46b0 +opentelemetry-instrumentation-urllib3==0.47b0 # via azure-monitor-opentelemetry -opentelemetry-instrumentation-wsgi==0.46b0 +opentelemetry-instrumentation-wsgi==0.47b0 # via # opentelemetry-instrumentation-django # opentelemetry-instrumentation-flask opentelemetry-resource-detector-azure==0.1.5 # via azure-monitor-opentelemetry -opentelemetry-sdk==1.25.0 +opentelemetry-sdk==1.26.0 # via # azure-monitor-opentelemetry # azure-monitor-opentelemetry-exporter @@ -278,7 +284,7 @@ opentelemetry-sdk==1.25.0 # microsoft-kiota-authentication-azure # microsoft-kiota-http # opentelemetry-resource-detector-azure -opentelemetry-semantic-conventions==0.46b0 +opentelemetry-semantic-conventions==0.47b0 # via # opentelemetry-instrumentation-aiohttp-client # opentelemetry-instrumentation-asgi @@ -293,9 +299,9 @@ opentelemetry-semantic-conventions==0.46b0 # opentelemetry-instrumentation-urllib3 # opentelemetry-instrumentation-wsgi # opentelemetry-sdk -opentelemetry-semantic-conventions-ai==0.3.4 +opentelemetry-semantic-conventions-ai==0.4.1 # via opentelemetry-instrumentation-openai -opentelemetry-util-http==0.46b0 +opentelemetry-util-http==0.47b0 # via # opentelemetry-instrumentation-aiohttp-client # opentelemetry-instrumentation-asgi @@ -327,13 +333,13 @@ pydantic==2.8.2 # via openai pydantic-core==2.20.1 # via pydantic -pyjwt[crypto]==2.8.0 +pyjwt[crypto]==2.9.0 # via + # -r requirements.in # msal - # pyjwt -pymupdf==1.24.7 +pymupdf==1.24.9 # via -r requirements.in -pymupdfb==1.24.6 +pymupdfb==1.24.9 # via pymupdf pypdf==4.3.1 # via -r requirements.in @@ -348,7 +354,7 @@ quart==0.19.6 # quart-cors quart-cors==0.7.0 # via -r requirements.in -regex==2024.5.15 +regex==2024.7.24 # via tiktoken requests==2.32.3 # via @@ -362,7 +368,6 @@ requests-oauthlib==2.0.0 six==1.16.0 # via # azure-core - # ecdsa # isodate # python-dateutil sniffio==1.3.1 @@ -372,22 +377,22 @@ sniffio==1.3.1 # openai soupsieve==2.5 # via beautifulsoup4 -std-uritemplate==1.0.3 +std-uritemplate==1.0.5 # via microsoft-kiota-abstractions -tenacity==8.5.0 +tenacity==9.0.0 # via -r requirements.in tiktoken==0.7.0 # via # -r requirements.in # openai-messages-token-helper # opentelemetry-instrumentation-openai -time-machine==2.14.2 +time-machine==2.15.0 # via pendulum -tqdm==4.66.4 +tqdm==4.66.5 # via openai types-beautifulsoup4==4.12.0.20240511 # via -r requirements.in -types-html5lib==1.1.11.20240228 +types-html5lib==1.1.11.20240806 # via types-beautifulsoup4 types-pillow==10.2.0.20240520 # via -r requirements.in @@ -406,7 +411,7 @@ tzdata==2024.1 # via pendulum urllib3==2.2.2 # via requests -uvicorn==0.30.3 +uvicorn==0.30.5 # via -r requirements.in werkzeug==3.0.3 # via diff --git a/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json index e69e0831fd..4b7c787f5f 100644 --- a/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json @@ -60,9 +60,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json index c8122cf090..a3d2008f1d 100644 --- a/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json index 727bd8f163..a4f68783db 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json @@ -60,9 +60,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json index b39f017c04..0c48ff8d7b 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json index 11a4d9c200..38453b053b 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json index 3934917fdf..407f72e30f 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json index b21eda65b9..75a213c349 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json @@ -60,9 +60,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json index 0a77d6671d..c31363b671 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json index 3389c66221..9f1a1ece30 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json @@ -60,9 +60,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json index e8c98bc214..11704f0bd1 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json @@ -61,9 +61,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_vision/client0/result.json b/tests/snapshots/test_app/test_ask_vision/client0/result.json index 773f7fe6f5..1df624d465 100644 --- a/tests/snapshots/test_app/test_ask_vision/client0/result.json +++ b/tests/snapshots/test_app/test_ask_vision/client0/result.json @@ -60,9 +60,7 @@ }, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_vision/client1/result.json b/tests/snapshots/test_app/test_ask_vision/client1/result.json index 2f149c30e2..1432f5311b 100644 --- a/tests/snapshots/test_app/test_ask_vision/client1/result.json +++ b/tests/snapshots/test_app/test_ask_vision/client1/result.json @@ -62,9 +62,7 @@ }, "message": { "content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_followup/client0/result.json b/tests/snapshots/test_app/test_chat_followup/client0/result.json index 6fde94793b..a1368949d2 100644 --- a/tests/snapshots/test_app/test_chat_followup/client0/result.json +++ b/tests/snapshots/test_app/test_chat_followup/client0/result.json @@ -73,14 +73,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_followup/client1/result.json b/tests/snapshots/test_app/test_chat_followup/client1/result.json index 282fe466c8..f669cb6a73 100644 --- a/tests/snapshots/test_app/test_chat_followup/client1/result.json +++ b/tests/snapshots/test_app/test_chat_followup/client1/result.json @@ -75,14 +75,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid/client0/result.json index 0fe98b3948..c5b8a13981 100644 --- a/tests/snapshots/test_app/test_chat_hybrid/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid/client1/result.json index b8c7b8e9fd..b4c6c82b08 100644 --- a/tests/snapshots/test_app/test_chat_hybrid/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json index 43dcd4fcb0..c735791869 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json index 11f0d329d6..3d54af8a1a 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json index d622b29880..312e37b4c7 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json index 7d97ad4606..6cfa27d470 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json b/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json index 4fc8ccb702..48bc451ec8 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json b/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json index 650e774158..2d1d0cb14e 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json b/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json index ff2a0fb0a6..c843981159 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json b/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json index 07a593976b..ae61789c86 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_seed/client0/result.json b/tests/snapshots/test_app/test_chat_seed/client0/result.json index 0fe98b3948..c5b8a13981 100644 --- a/tests/snapshots/test_app/test_chat_seed/client0/result.json +++ b/tests/snapshots/test_app/test_chat_seed/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_seed/client1/result.json b/tests/snapshots/test_app/test_chat_seed/client1/result.json index b8c7b8e9fd..b4c6c82b08 100644 --- a/tests/snapshots/test_app/test_chat_seed/client1/result.json +++ b/tests/snapshots/test_app/test_chat_seed/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json b/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json index 225cadb5b9..faf951a990 100644 --- a/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json +++ b/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": { "conversation_id": 1234 diff --git a/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json b/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json index 3c093bd75e..fc4ea27c09 100644 --- a/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json +++ b/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": { "conversation_id": 1234 diff --git a/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines index fe5d00f936..a3e666556d 100644 --- a/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines @@ -1,4 +1,4 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "function_call": null, "role": "assistant", "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "role": "assistant"}} {"delta": {"role": "assistant"}, "context": {"followup_questions": ["What is the capital of Spain?"]}} diff --git a/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines index 0c262b00ff..0cc2591897 100644 --- a/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines @@ -1,4 +1,4 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "function_call": null, "role": "assistant", "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "role": "assistant"}} {"delta": {"role": "assistant"}, "context": {"followup_questions": ["What is the capital of Spain?"]}} diff --git a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines index 129c4393dd..fcf231b86b 100644 --- a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": {"conversation_id": 1234}} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines index 161475db8f..17dbfca5ef 100644 --- a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": {"conversation_id": 1234}} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines index ce0c19d74c..cb8393d2ab 100644 --- a/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines index a37aa0873e..b97979fd7b 100644 --- a/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines index fd1a99ed8c..d65fa2aac7 100644 --- a/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": "category ne 'excluded' and (oids/any(g:search.in(g, 'OID_X')) or groups/any(g:search.in(g, 'GROUP_Y, GROUP_Z')))", "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines index bef8e192e8..887a747057 100644 --- a/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'Are interest rates high?\\n\\nSources:\\nFinancial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions '}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines index 825d37ad96..206cb09ddc 100644 --- a/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines @@ -1,3 +1,3 @@ {"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "], "images": [{"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==", "detail": "auto"}]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "vector_fields": ["embedding", "imageEmbedding"], "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"\\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\\n Each text source starts in a new line and has the file name followed by colon and the actual information\\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\\n Answer the following question using only the data provided in the sources below.\\n If asking a clarifying question to the user would help, ask the question.\\n Be brief in your answers.\\n For tabular information return it as an html table. Do not return markdown format.\\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\\n \\n \\n \"}", "{'role': 'user', 'content': [{'text': 'Are interest rates high?', 'type': 'text'}, {'text': '\\n\\nSources:\\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ', 'type': 'text'}, {'image_url': {'url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==', 'detail': 'auto'}, 'type': 'image_url'}]}"], "props": {"model": "gpt-4"}}]}, "session_state": null} -{"delta": {"content": null, "function_call": null, "role": "assistant", "tool_calls": null}} -{"delta": {"content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", "function_call": null, "role": null, "tool_calls": null}} +{"delta": {"content": null, "role": "assistant"}} +{"delta": {"content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_text/client0/result.json b/tests/snapshots/test_app/test_chat_text/client0/result.json index 0abaab7b4c..f8cb2f2774 100644 --- a/tests/snapshots/test_app/test_chat_text/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text/client1/result.json b/tests/snapshots/test_app/test_chat_text/client1/result.json index 479127c609..18942c1d3b 100644 --- a/tests/snapshots/test_app/test_chat_text/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json b/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json index 14b46ca74b..01ca42a0b4 100644 --- a/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json b/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json index a78c3a8ea2..2c0f9c4fde 100644 --- a/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json index b1d1d5f468..6dd15a0f40 100644 --- a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json index 503e767358..52aa0a3400 100644 --- a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json index 5de4cc1d2a..6cf5d13a09 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json index 9c1b003d61..4205f9600c 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json b/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json index b1d1d5f468..6dd15a0f40 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json b/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json index 503e767358..52aa0a3400 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vector/client0/result.json b/tests/snapshots/test_app/test_chat_vector/client0/result.json index 8235c27629..54a9143a27 100644 --- a/tests/snapshots/test_app/test_chat_vector/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vector/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vector/client1/result.json b/tests/snapshots/test_app/test_chat_vector/client1/result.json index 836d1cfc65..c2c2237c62 100644 --- a/tests/snapshots/test_app/test_chat_vector/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vector/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json index 4b0dfbe21a..59bb4bbaf8 100644 --- a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json index f6f1b8191c..d84cd7ce29 100644 --- a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vision/client0/result.json b/tests/snapshots/test_app/test_chat_vision/client0/result.json index f83b949f3f..3274b8d76b 100644 --- a/tests/snapshots/test_app/test_chat_vision/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vision/client0/result.json @@ -64,14 +64,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vision/client1/result.json b/tests/snapshots/test_app/test_chat_vision/client1/result.json index 1caf85f418..d48367de64 100644 --- a/tests/snapshots/test_app/test_chat_vision/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vision/client1/result.json @@ -74,14 +74,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json b/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json index eb4ca226c2..4db0c187c8 100644 --- a/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json @@ -70,14 +70,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json b/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json index e17ec9f91f..b932023fbb 100644 --- a/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json @@ -74,14 +74,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_with_history/client0/result.json b/tests/snapshots/test_app/test_chat_with_history/client0/result.json index b6114cc80b..a47482adad 100644 --- a/tests/snapshots/test_app/test_chat_with_history/client0/result.json +++ b/tests/snapshots/test_app/test_chat_with_history/client0/result.json @@ -74,14 +74,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_with_history/client1/result.json b/tests/snapshots/test_app/test_chat_with_history/client1/result.json index 918d1ff67f..aec4ccc719 100644 --- a/tests/snapshots/test_app/test_chat_with_history/client1/result.json +++ b/tests/snapshots/test_app/test_chat_with_history/client1/result.json @@ -76,14 +76,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json b/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json index c843489266..ad10d42ce5 100644 --- a/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json +++ b/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json @@ -72,14 +72,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json b/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json index 88b80552e4..a895b81f02 100644 --- a/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json +++ b/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json @@ -74,14 +74,9 @@ } ] }, - "finish_reason": "stop", - "index": 0, - "logprobs": null, "message": { "content": "The capital of France is Paris. [Benefit_Options-2.pdf].", - "function_call": null, - "role": "assistant", - "tool_calls": null + "role": "assistant" }, "session_state": null } \ No newline at end of file