diff --git a/README.md b/README.md index 6aba572..6cebf77 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,31 @@ The url for the plugin is: https://github.com/Formartha/pytest-ai1899/tree/main The plugin allows a system to decide a query term, configure the ai1899 stack location, limit the amount of responses back and deselect tests (skip) which dosn't meet the query criteria. +Example for creating the collection to query from: +--------------------------------------------------- +An example of creating a collection can be found here +In the example, you will find a dictonary with ```{"test_name": "and the test description"}```, this will allow generating a proper vector based on the NLP model which is being used in the AI stack. + +By creating this collection, you will be able to uload it to ai1899 using either swagger or via direct call: + +``` +import requests + +url = "http://127.0.0.1/ai/upsert_collection" + +payload = {'collection': 'Tests1'} +files=[ + ('file',('collection_a_example.json',open('collection_a_example.json','rb'),'application/json')) +] +headers = {} + +response = requests.request("POST", url, headers=headers, data=payload, files=files) + +print(response.text) +``` + Troubleshoot ------------ There is a known issue to install docker-compose on Mx processors (Mac), to fix it you should. 1. pip3 install "cython<3.0.0" wheel && pip3 install pyyaml==5.4.1 --no-build-isolation -2. pip3 install docker-compose \ No newline at end of file +2. pip3 install docker-compose