File: test_vector_store.py

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (43 lines) | stat: -rw-r--r-- 1,552 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# pylint: disable=line-too-long,useless-suppression
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# cSpell:disable
import unittest
from azure.ai.agents._utils.model_base import _deserialize
from azure.ai.agents.models import _models


class Test(unittest.TestCase):

    def testName(self):
        val = {
            "id": "vs_OQpX6y9YM368EBZ5GmF45kRO",
            "object": "vector_store",
            "name": "TV Support FAQ",
            "status": "completed",
            "usage_bytes": 0,
            "created_at": 1729730726,
            "file_counts": {"in_progress": 0, "completed": 0, "failed": 0, "cancelled": 0, "total": 0},
            "metadata": {"source": "Agent API Tests"},
            "expires_after": None,
            "expires_at": None,
            "last_active_at": 1729730726,
            "configuration": {
                "data_sources": [
                    {
                        "type": "uri_asset",
                        "uri": "azureml://subscriptions/10e1de13-9717-4242-acf5-3e241940d326/resourcegroups/rg-sawidderai/workspaces/sawidder-0278/datastores/workspaceblobstore/paths/UI/2024-10-01_001042_UTC/unit-test.txt",
                    }
                ]
            },
            "configuration1": {},
        }
        # json_val = json.dumps(val)
        vct = _deserialize(_models.VectorStore, val)


if __name__ == "__main__":
    # import sys;sys.argv = ['', 'Test.testName']
    unittest.main()