Description of exchanger for Iris. What is exchaner and how can it be used ?
When to use exchanger ?
Exchanger lets you perform a free interaction with the LLM, with a string, a document or no input. The prompt is not changed, so it gives more freedom but you need to perform the optimization.
Example of use case
If you wan't to interact directly to an LLM to reformulate a query, you should use exchanger.
For tasks such as
answer a generic question
code generation
any treatment of text : summarization, translation
API
Exchange freely with document input
import requeststoken ='JWT '+''# set your token hereurl ="https://iris.egis-group.com/api/cgpt_structure/task_execute/?label_task=exchange_request_with_document"payload ={'values_list':'[{"label":"question_1","val":"Qu\'est-ce que le WorldGBC ?"}]'}files=[ ('document_list',('ANZ.pdf',open('/C:/Users/a.parre/Desktop/sustainecho/cgpt/data/ANZ.pdf','rb'),'application/pdf'))]headers ={'Authorization': token}response = requests.request("POST", url, headers=headers, data=payload, files=files)
Exchange with string input
import requestsimport jsontoken ='JWT '+''# set your token hereurl ="https://iris.egis-group.com/api/cgpt_structure/task_execute/?label_task=exchange_request"payload = json.dumps({"values_list": [ {"label": "question_1","val": "What is the main subject of the text ?" } ],"string_list": ["Text 1 to exchange with","Texte 2 to exchange with" ]})headers ={'Authorization': token,'Content-Type':'application/json'}response = requests.request("POST", url, headers=headers, data=payload)
Exchange with no input
import requeststoken ='JWT '+''# set your tokenurl ="https://iris.egis-group.com/api/cgpt_structure/task_execute/?label_task=exchange_request_no_text"payload ={'values_list':'[{"label":"question_1","val":"What is the name of the capital of France?"}]'}files=[]headers ={'Authorization': token}response = requests.request("POST", url, headers=headers, data=payload, files=files)