Input path: /home/debian/html/nutritwin/output_llm/6722339802ae6/input.json Output path: /home/debian/html/nutritwin/output_llm/6722339802ae6/output.json Input text: Chanterelles. DB path: __deriveddata__/DerivedObjects/Data/KcalMeDB_fr.sl3 Picto path: __deriveddata__/DerivedObjects/Data/PictoMatcherNetNG_fr.json Sport grounding path: __deriveddata__/DerivedObjects/Data/DerivedSportMET.json ================================================================================================================================== Prompt from user: Chanterelles. ================================================================================================================================== ==================================== Prompt ============================================= Identify in this list of intents: ["Identify food consumption or declaration", "Identify the user physical activity", "Answer a nutrition question", "Other intent"], the intents of the prompt: ###Chanterelles.###. Format the result in JSON format: {intents: []}. ========================================================================================= ------------------------------ LLM Raw response ----------------------------- ```json { "intents": ["Identify food consumption or declaration"] } ``` ----------------------------------------------------------------------------- ----------------- Make it compliant ------------------ ```json { "intents": ["Identify food consumption or declaration"] } ``` ------------------------------------------------------ ------------------------ After simplification ------------------------ { "intents": ["Identify food consumption or declaration"]} ---------------------------------------------------------------------- ==================================== Prompt ============================================= Convert this natural language query : """Chanterelles.""" into an array in JSON of consumed foods and beverages. Provide a solution without explanation. Use only the ontology described in this Turtle/RDF model: """ @prefix food: . @prefix rdfs: . @prefix xsd: . @prefix owl: . @prefix prov: . food: a owl:Ontology ; rdfs:comment "Definition of the food archetype"@en . food:name a owl:DatatypeProperty; rdfs:label "name"@en; rdfs:comment "Food or beverage identifier, the name should not contain information related to quantity or container (like glass...)."@en; rdfs:comment "Ignore food or beverage when it is not consumed in the past, now or in the future."@en; rdfs:comment "The cooking mode is not in the name. Keep the same language"@en; rdfs:range xsd:string. food:quantity a owl:DatatypeProperty ; rdfs:label "quantity"@en; rdfs:comment "The quantity of food or drink that is or was consumed. Quantity examples in french: 'un quignon', 'un cornet', 'un verre', 'une tranche', 'une boule', 'un', 'deux', 'trois',... Keep the same language."@en; rdfs:range xsd:string. food:cookingMethod a owl:DatatypeProperty ; rdfs:label "cooking method"@en; rdfs:comment "The cooking method of food. Keep the same language"@en; rdfs:range xsd:string. food:type a owl:DatatypeProperty ; rdfs:label "type of food"@en; rdfs:comment "Identify the type of food."@en; rdfs:range xsd:string. food:food a food:type ; rdfs:label "food" . food:beverage a food:type ; rdfs:label "beverage" . food:timeOfTheDay a owl:DatatypeProperty ; rdfs:label "time of the day"@en; rdfs:comment "Time of the day when food or drink was consumed."@en; rdfs:range xsd:string. food:breakfast a food:timeOfTheDay ; rdfs:label "breakfast" . food:lunch a food:timeOfTheDay ; rdfs:label "lunch" . food:snacking a food:timeOfTheDay ; rdfs:label "snacking" . food:dinner a food:timeOfTheDay ; rdfs:label "dinner" . food:brand a owl:DatatypeProperty ; rdfs:label "Brand"@en; rdfs:comment "Food or beverage brand. The restaurants are not brand."@en; rdfs:comment "When the name is very known (ex: Activia, Coca) and the brand is not mentioned, guess the brand."@en; rdfs:range xsd:string. food:company a owl:DatatypeProperty ; rdfs:label "Company"@en; rdfs:comment "Product company."@en; rdfs:range xsd:string. food:enumEvent a rdfs:Class . food:event a owl:DatatypeProperty ; rdfs:label "event"@en; rdfs:comment "Event of eating or drinking. Each must have an event"@en; rdfs:range food:enumEvent. food:intent a food:enumEvent ; rdfs:label "intent" . rdfs:comment "When the event should happen"@en. food:declaration a food:enumEvent ; rdfs:label "declaration" . rdfs:comment "When the event has already occured"@en. food:unknownEvent a food:enumEvent ; rdfs:label "unknown" ; rdfs:comment "When the event is unknown in the day"@en. """ ========================================================================================= Traceback (most recent call last): File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions yield File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_transports/default.py", line 228, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request raise exc from None File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request response = connection.handle_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 99, in handle_request raise exc File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 76, in handle_request stream = self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 122, in _connect stream = self._network_backend.connect_tcp(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 205, in connect_tcp with map_exceptions(exc_map): File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__ self.gen.throw(typ, value, traceback) File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 952, in _request response = self._client.send( ^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_client.py", line 901, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_client.py", line 929, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_client.py", line 966, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_client.py", line 1002, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_transports/default.py", line 227, in handle_request with map_httpcore_exceptions(): File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__ self.gen.throw(typ, value, traceback) File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/debian/html/nutritwin/resources/KCALLMMainService.py", line 70, in omess = KCALLMMain.runEvent(event) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/html/nutritwin/resources/KCALLMMain.py", line 134, in runEvent resp = KCALLMMainSpeechToData.execute(speech, image64, comment, appId, device, version, age, gender, longitude, latitude, test, llmid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/html/nutritwin/resources/KCALLMMainSpeechToData.py", line 39, in execute omess = executeLLMSingle(text, image64, comment, model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/html/nutritwin/resources/KCALLMMainSpeechToData.py", line 183, in executeLLMSingle jresult = KCALLMEngine.runLLM(prompt, image64, model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/html/nutritwin/resources/KCALLMEngine.py", line 266, in runLLM resp = client.chat.completions.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_utils/_utils.py", line 277, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 590, in create return self._post( ^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request return self._request( ^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 961, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 1053, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 976, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 1053, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/home/debian/myVirtualPythonEnvV2/lib/python3.11/site-packages/openai/_base_client.py", line 971, in _request raise APITimeoutError(request=request) from err openai.APITimeoutError: Request timed out.