Advertisement
karimmd

Paper-QA Terminal Output

Sep 23rd, 2024 (edited)
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 65.86 KB | None | 0 0
  1. [20:07:03] Starting paper search for 'Here are three unique keyword searches that can help answer the question How the SDN controller works within
  2.           FANET?'.
  3.            New file to index: Zhu et al_2023_Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric.pdf...
  4. [20:07:07] Failed to parse all of title, DOI, and authors from the ParsingSettings.structured_citation_prompt's response Here is the extracted
  5.           information in JSON format:
  6.  
  7.           ```
  8.           {
  9.               "title": "Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric Software-Deï¬ned FANET",
  10.               "authors": ["Zhu, Liehuang", et al],
  11.               "doi": null
  12.           }
  13.           ```
  14.  
  15.           Note that I assumed the publication date is 2023 as there is no author date provided. Also, since DOI (Digital Object Identifier) is not
  16.           specified in the MLA citation, I returned it as `null`., consider using a manifest file or specifying a different citation prompt.
  17.           ╭─────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
  18.           │ /data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py:321 in aadd                                                      │
  19.           │                                                                                                                                         │
  20.           │   318 │   │   │   if clean_text.startswith("json"):                                                                                     │
  21.           │   319 │   │   │   │   clean_text = clean_text.replace("json", "", 1)                                                                    │
  22.           │   320 │   │   │   try:                                                                                                                  │
  23.           │ ❱ 321 │   │   │   │   citation_json = json.loads(clean_text)                                                                            │
  24.           │   322 │   │   │   │   if citation_title := citation_json.get("title"):                                                                  │
  25.           │   323 │   │   │   │   │   title = citation_title                                                                                        │
  26.           │   324 │   │   │   │   if citation_doi := citation_json.get("doi"):                                                                      │
  27.           │                                                                                                                                         │
  28.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/__init__.py:346 in loads                                                                  │
  29.           │                                                                                                                                         │
  30.           │   343 │   if (cls is None and object_hook is None and                                                                                   │
  31.           │   344 │   │   │   parse_int is None and parse_float is None and                                                                         │
  32.           │   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                                                     │
  33.           │ ❱ 346 │   │   return _default_decoder.decode(s)                                                                                         │
  34.           │   347 │   if cls is None:                                                                                                               │
  35.           │   348 │   │   cls = JSONDecoder                                                                                                         │
  36.           │   349 │   if object_hook is not None:                                                                                                   │
  37.           │                                                                                                                                         │
  38.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:337 in decode                                                                  │
  39.           │                                                                                                                                         │
  40.           │   334 │   │   containing a JSON document).                                                                                              │
  41.           │   335 │   │                                                                                                                             │
  42.           │   336 │   │   """                                                                                                                       │
  43.           │ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                         │
  44.           │   338 │   │   end = _w(s, end).end()                                                                                                    │
  45.           │   339 │   │   if end != len(s):                                                                                                         │
  46.           │   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                                                           │
  47.           │                                                                                                                                         │
  48.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:355 in raw_decode                                                              │
  49.           │                                                                                                                                         │
  50.           │   352 │   │   try:                                                                                                                      │
  51.           │   353 │   │   │   obj, end = self.scan_once(s, idx)                                                                                     │
  52.           │   354 │   │   except StopIteration as err:                                                                                              │
  53.           │ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                      │
  54.           │   356 │   │   return obj, end                                                                                                           │
  55.           │   357                                                                                                                                   │
  56.           ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  57.           JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  58.  
  59. Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
  60. LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
  61.  
  62.  
  63. Provider List: https://docs.litellm.ai/docs/providers
  64.  
  65.  
  66. Provider List: https://docs.litellm.ai/docs/providers
  67.  
  68.  
  69. Provider List: https://docs.litellm.ai/docs/providers
  70.  
  71.  
  72. Provider List: https://docs.litellm.ai/docs/providers
  73.  
  74. Failed to execute tool call for tool paper_search.
  75.   + Exception Group Traceback (most recent call last):
  76.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  77.   |     content = await tool._tool_fn(
  78.   |               ^^^^^^^^^^^^^^^^^^^^
  79.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 127, in paper_search
  80.   |     index = await get_directory_index(settings=self.settings)
  81.   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  82.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 485, in get_directory_index
  83.   |     async with anyio.create_task_group() as tg:
  84.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 736, in __aexit__
  85.   |     raise BaseExceptionGroup(
  86.   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  87.   +-+---------------- 1 ----------------
  88.     | Traceback (most recent call last):
  89.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1230, in aembedding
  90.     |     openai_aclient: AsyncOpenAI = self._get_openai_client(  # type: ignore
  91.     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  92.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 608, in _get_openai_client
  93.     |     _new_client: Union[OpenAI, AsyncOpenAI] = AsyncOpenAI(
  94.     |                                               ^^^^^^^^^^^^
  95.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/openai/_client.py", line 319, in __init__
  96.     |     raise OpenAIError(
  97.     | openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  98.     |
  99.     | During handling of the above exception, another exception occurred:
  100.     |
  101.     | Traceback (most recent call last):
  102.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3224, in aembedding
  103.     |     response = await init_response
  104.     |                ^^^^^^^^^^^^^^^^^^^
  105.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1275, in aembedding
  106.     |     raise OpenAIError(
  107.     | litellm.llms.OpenAI.openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  108.     |
  109.     | During handling of the above exception, another exception occurred:
  110.     |
  111.     | Traceback (most recent call last):
  112.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 377, in process_file
  113.     |     await tmp_docs.aadd(
  114.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 383, in aadd
  115.     |     if await self.aadd_texts(texts, doc, all_settings, embedding_model):
  116.     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  117.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 428, in aadd_texts
  118.     |     await embedding_model.embed_documents(texts=[t.text for t in texts])
  119.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/llms.py", line 74, in embed_documents
  120.     |     response = await aembedding(
  121.     |                ^^^^^^^^^^^^^^^^^
  122.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1589, in wrapper_async
  123.     |     raise e
  124.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1409, in wrapper_async
  125.     |     result = await original_function(*args, **kwargs)
  126.     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  127.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3233, in aembedding
  128.     |     raise exception_type(
  129.     |           ^^^^^^^^^^^^^^^
  130.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 8199, in exception_type
  131.     |     raise e
  132.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 6489, in exception_type
  133.     |     raise AuthenticationError(
  134.     | litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  135.     +------------------------------------
  136. [20:07:08] Starting paper search for 'Software Defined Network, Tactical, Year: 2015-2024'.
  137.            New file to index: Zhu et al_2023_Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric.pdf...
  138. [20:07:11] Failed to parse all of title, DOI, and authors from the ParsingSettings.structured_citation_prompt's response Here is the extracted
  139.           information in JSON format:
  140.           ```
  141.           {
  142.               "title": "Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric Software-Defined FANET.",
  143.               "authors": ["Zhu, Liehuang", "et al."],
  144.               "doi": null
  145.           }
  146.           ```
  147.           Note that the DOI field is left as `null` since it's not present in the MLA citation., consider using a manifest file or specifying a
  148.            different citation prompt.
  149.            ╭─────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
  150.            │ /data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py:321 in aadd                                                      │
  151.            │                                                                                                                                         │
  152.            │   318 │   │   │   if clean_text.startswith("json"):                                                                                     │
  153.            │   319 │   │   │   │   clean_text = clean_text.replace("json", "", 1)                                                                    │
  154.            │   320 │   │   │   try:                                                                                                                  │
  155.            │ ❱ 321 │   │   │   │   citation_json = json.loads(clean_text)                                                                            │
  156.            │   322 │   │   │   │   if citation_title := citation_json.get("title"):                                                                  │
  157.            │   323 │   │   │   │   │   title = citation_title                                                                                        │
  158.            │   324 │   │   │   │   if citation_doi := citation_json.get("doi"):                                                                      │
  159.            │                                                                                                                                         │
  160.            │ /data5/miniconda3/envs/pq/lib/python3.11/json/__init__.py:346 in loads                                                                  │
  161.            │                                                                                                                                         │
  162.            │   343 │   if (cls is None and object_hook is None and                                                                                   │
  163.            │   344 │   │   │   parse_int is None and parse_float is None and                                                                         │
  164.            │   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                                                     │
  165.            │ ❱ 346 │   │   return _default_decoder.decode(s)                                                                                         │
  166.            │   347 │   if cls is None:                                                                                                               │
  167.            │   348 │   │   cls = JSONDecoder                                                                                                         │
  168.            │   349 │   if object_hook is not None:                                                                                                   │
  169.            │                                                                                                                                         │
  170.            │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:337 in decode                                                                  │
  171.            │                                                                                                                                         │
  172.            │   334 │   │   containing a JSON document).                                                                                              │
  173.            │   335 │   │                                                                                                                             │
  174.            │   336 │   │   """                                                                                                                       │
  175.           │ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                         │
  176.           │   338 │   │   end = _w(s, end).end()                                                                                                    │
  177.           │   339 │   │   if end != len(s):                                                                                                         │
  178.           │   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                                                           │
  179.           │                                                                                                                                         │
  180.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:355 in raw_decode                                                              │
  181.           │                                                                                                                                         │
  182.           │   352 │   │   try:                                                                                                                      │
  183.           │   353 │   │   │   obj, end = self.scan_once(s, idx)                                                                                     │
  184.           │   354 │   │   except StopIteration as err:                                                                                              │
  185.           │ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                      │
  186.           │   356 │   │   return obj, end                                                                                                           │
  187.           │   357                                                                                                                                   │
  188.           ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  189.           JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  190.  
  191. Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
  192. LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
  193.  
  194.  
  195. Provider List: https://docs.litellm.ai/docs/providers
  196.  
  197.  
  198. Provider List: https://docs.litellm.ai/docs/providers
  199.  
  200.  
  201. Provider List: https://docs.litellm.ai/docs/providers
  202.  
  203.  
  204. Provider List: https://docs.litellm.ai/docs/providers
  205.  
  206. Failed to execute tool call for tool paper_search.
  207.  + Exception Group Traceback (most recent call last):
  208.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  209.  |     content = await tool._tool_fn(
  210.  |               ^^^^^^^^^^^^^^^^^^^^
  211.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 127, in paper_search
  212.  |     index = await get_directory_index(settings=self.settings)
  213.  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  214.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 485, in get_directory_index
  215.  |     async with anyio.create_task_group() as tg:
  216.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 736, in __aexit__
  217.  |     raise BaseExceptionGroup(
  218.  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  219.  +-+---------------- 1 ----------------
  220.    | Traceback (most recent call last):
  221.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1230, in aembedding
  222.    |     openai_aclient: AsyncOpenAI = self._get_openai_client(  # type: ignore
  223.    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  224.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 608, in _get_openai_client
  225.    |     _new_client: Union[OpenAI, AsyncOpenAI] = AsyncOpenAI(
  226.    |                                               ^^^^^^^^^^^^
  227.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/openai/_client.py", line 319, in __init__
  228.    |     raise OpenAIError(
  229.    | openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  230.    |
  231.    | During handling of the above exception, another exception occurred:
  232.    |
  233.    | Traceback (most recent call last):
  234.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3224, in aembedding
  235.    |     response = await init_response
  236.    |                ^^^^^^^^^^^^^^^^^^^
  237.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1275, in aembedding
  238.    |     raise OpenAIError(
  239.    | litellm.llms.OpenAI.openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  240.    |
  241.    | During handling of the above exception, another exception occurred:
  242.    |
  243.    | Traceback (most recent call last):
  244.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 377, in process_file
  245.    |     await tmp_docs.aadd(
  246.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 383, in aadd
  247.    |     if await self.aadd_texts(texts, doc, all_settings, embedding_model):
  248.    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  249.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 428, in aadd_texts
  250.    |     await embedding_model.embed_documents(texts=[t.text for t in texts])
  251.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/llms.py", line 74, in embed_documents
  252.    |     response = await aembedding(
  253.    |                ^^^^^^^^^^^^^^^^^
  254.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1589, in wrapper_async
  255.    |     raise e
  256.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1409, in wrapper_async
  257.    |     result = await original_function(*args, **kwargs)
  258.    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  259.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3233, in aembedding
  260.    |     raise exception_type(
  261.    |           ^^^^^^^^^^^^^^^
  262.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 8199, in exception_type
  263.    |     raise e
  264.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 6489, in exception_type
  265.    |     raise AuthenticationError(
  266.    | litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  267.    +------------------------------------
  268.           Starting paper search for 'Cognitive Radio, FANET, Controller, Networking, Year: 2018-2024'.
  269.           New file to index: Zhu et al_2023_Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric.pdf...
  270. [20:07:15] Failed to parse all of title, DOI, and authors from the ParsingSettings.structured_citation_prompt's response Here is the extracted
  271.           information in JSON format:
  272.  
  273.           ```
  274.           {
  275.               "title": "Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric Software-Defined FANET.",
  276.               "authors": ["Zhu, Liehuang", "Md Monjurul Karim", "Kashif Sharif", "Chang Xu", "Fan Li"],
  277.               "doi": null
  278.           }
  279.           ```
  280.  
  281.           Note that I was unable to find a DOI (digital object identifier) in the provided citation, so it is represented as `null`., consider using
  282.           a manifest file or specifying a different citation prompt.
  283.           ╭─────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
  284.           │ /data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py:321 in aadd                                                      │
  285.           │                                                                                                                                         │
  286.           │   318 │   │   │   if clean_text.startswith("json"):                                                                                     │
  287.           │   319 │   │   │   │   clean_text = clean_text.replace("json", "", 1)                                                                    │
  288.           │   320 │   │   │   try:                                                                                                                  │
  289.           │ ❱ 321 │   │   │   │   citation_json = json.loads(clean_text)                                                                            │
  290.           │   322 │   │   │   │   if citation_title := citation_json.get("title"):                                                                  │
  291.           │   323 │   │   │   │   │   title = citation_title                                                                                        │
  292.           │   324 │   │   │   │   if citation_doi := citation_json.get("doi"):                                                                      │
  293.           │                                                                                                                                         │
  294.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/__init__.py:346 in loads                                                                  │
  295.           │                                                                                                                                         │
  296.           │   343 │   if (cls is None and object_hook is None and                                                                                   │
  297.           │   344 │   │   │   parse_int is None and parse_float is None and                                                                         │
  298.           │   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                                                     │
  299.           │ ❱ 346 │   │   return _default_decoder.decode(s)                                                                                         │
  300.           │   347 │   if cls is None:                                                                                                               │
  301.           │   348 │   │   cls = JSONDecoder                                                                                                         │
  302.           │   349 │   if object_hook is not None:                                                                                                   │
  303.           │                                                                                                                                         │
  304.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:337 in decode                                                                  │
  305.           │                                                                                                                                         │
  306.           │   334 │   │   containing a JSON document).                                                                                              │
  307.           │   335 │   │                                                                                                                             │
  308.           │   336 │   │   """                                                                                                                       │
  309.           │ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                         │
  310.           │   338 │   │   end = _w(s, end).end()                                                                                                    │
  311.           │   339 │   │   if end != len(s):                                                                                                         │
  312.           │   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                                                           │
  313.           │                                                                                                                                         │
  314.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:355 in raw_decode                                                              │
  315.           │                                                                                                                                         │
  316.           │   352 │   │   try:                                                                                                                      │
  317.           │   353 │   │   │   obj, end = self.scan_once(s, idx)                                                                                     │
  318.           │   354 │   │   except StopIteration as err:                                                                                              │
  319.           │ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                      │
  320.           │   356 │   │   return obj, end                                                                                                           │
  321.           │   357                                                                                                                                   │
  322.           ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  323.           JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  324.  
  325. Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
  326. LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
  327.  
  328.  
  329. Provider List: https://docs.litellm.ai/docs/providers
  330.  
  331.  
  332. Provider List: https://docs.litellm.ai/docs/providers
  333.  
  334.  
  335. Provider List: https://docs.litellm.ai/docs/providers
  336.  
  337.  
  338. Provider List: https://docs.litellm.ai/docs/providers
  339.  
  340. Failed to execute tool call for tool paper_search.
  341.  + Exception Group Traceback (most recent call last):
  342.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  343.  |     content = await tool._tool_fn(
  344.  |               ^^^^^^^^^^^^^^^^^^^^
  345.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 127, in paper_search
  346.  |     index = await get_directory_index(settings=self.settings)
  347.  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  348.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 485, in get_directory_index
  349.  |     async with anyio.create_task_group() as tg:
  350.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 736, in __aexit__
  351.  |     raise BaseExceptionGroup(
  352.  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  353.  +-+---------------- 1 ----------------
  354.    | Traceback (most recent call last):
  355.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1230, in aembedding
  356.    |     openai_aclient: AsyncOpenAI = self._get_openai_client(  # type: ignore
  357.    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  358.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 608, in _get_openai_client
  359.    |     _new_client: Union[OpenAI, AsyncOpenAI] = AsyncOpenAI(
  360.    |                                               ^^^^^^^^^^^^
  361.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/openai/_client.py", line 319, in __init__
  362.    |     raise OpenAIError(
  363.    | openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  364.    |
  365.    | During handling of the above exception, another exception occurred:
  366.    |
  367.    | Traceback (most recent call last):
  368.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3224, in aembedding
  369.    |     response = await init_response
  370.    |                ^^^^^^^^^^^^^^^^^^^
  371.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1275, in aembedding
  372.    |     raise OpenAIError(
  373.    | litellm.llms.OpenAI.openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  374.    |
  375.    | During handling of the above exception, another exception occurred:
  376.    |
  377.    | Traceback (most recent call last):
  378.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 377, in process_file
  379.    |     await tmp_docs.aadd(
  380.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 383, in aadd
  381.    |     if await self.aadd_texts(texts, doc, all_settings, embedding_model):
  382.    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  383.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 428, in aadd_texts
  384.    |     await embedding_model.embed_documents(texts=[t.text for t in texts])
  385.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/llms.py", line 74, in embed_documents
  386.    |     response = await aembedding(
  387.    |                ^^^^^^^^^^^^^^^^^
  388.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1589, in wrapper_async
  389.    |     raise e
  390.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1409, in wrapper_async
  391.    |     result = await original_function(*args, **kwargs)
  392.    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  393.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3233, in aembedding
  394.    |     raise exception_type(
  395.    |           ^^^^^^^^^^^^^^^
  396.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 8199, in exception_type
  397.    |     raise e
  398.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 6489, in exception_type
  399.    |     raise AuthenticationError(
  400.    | litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  401.    +------------------------------------
  402.           Starting paper search for 'Internet of Things, FANET, OpenFlow, Network Function Virtualization, Year: 2010-2024'.
  403.           New file to index: Zhu et al_2023_Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric.pdf...
  404. [20:07:18] Failed to parse all of title, DOI, and authors from the ParsingSettings.structured_citation_prompt's response Here is the extracted
  405.           information in a JSON format:
  406.  
  407.           ```json
  408.           {
  409.               "title": "Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric Software-Defined FANET",
  410.               "authors": [
  411.                   "Zhu, Liehuang"
  412.               ],
  413.               "doi": null
  414.           }
  415.           ```
  416.  
  417.           Note that I set the date accessed to 2024 as per your request, but it's not specified in the original citation., consider using a manifest
  418.           file or specifying a different citation prompt.
  419.           ╭─────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
  420.           │ /data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py:321 in aadd                                                      │
  421.           │                                                                                                                                         │
  422.           │   318 │   │   │   if clean_text.startswith("json"):                                                                                     │
  423.           │   319 │   │   │   │   clean_text = clean_text.replace("json", "", 1)                                                                    │
  424.           │   320 │   │   │   try:                                                                                                                  │
  425.           │ ❱ 321 │   │   │   │   citation_json = json.loads(clean_text)                                                                            │
  426.           │   322 │   │   │   │   if citation_title := citation_json.get("title"):                                                                  │
  427.           │   323 │   │   │   │   │   title = citation_title                                                                                        │
  428.           │   324 │   │   │   │   if citation_doi := citation_json.get("doi"):                                                                      │
  429.           │                                                                                                                                         │
  430.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/__init__.py:346 in loads                                                                  │
  431.           │                                                                                                                                         │
  432.           │   343 │   if (cls is None and object_hook is None and                                                                                   │
  433.           │   344 │   │   │   parse_int is None and parse_float is None and                                                                         │
  434.           │   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                                                     │
  435.           │ ❱ 346 │   │   return _default_decoder.decode(s)                                                                                         │
  436.           │   347 │   if cls is None:                                                                                                               │
  437.           │   348 │   │   cls = JSONDecoder                                                                                                         │
  438.           │   349 │   if object_hook is not None:                                                                                                   │
  439.           │                                                                                                                                         │
  440.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:337 in decode                                                                  │
  441.           │                                                                                                                                         │
  442.           │   334 │   │   containing a JSON document).                                                                                              │
  443.           │   335 │   │                                                                                                                             │
  444.           │   336 │   │   """                                                                                                                       │
  445.            │ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                         │
  446.            │   338 │   │   end = _w(s, end).end()                                                                                                    │
  447.            │   339 │   │   if end != len(s):                                                                                                         │
  448.            │   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                                                           │
  449.            │                                                                                                                                         │
  450.            │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:355 in raw_decode                                                              │
  451.            │                                                                                                                                         │
  452.            │   352 │   │   try:                                                                                                                      │
  453.            │   353 │   │   │   obj, end = self.scan_once(s, idx)                                                                                     │
  454.            │   354 │   │   except StopIteration as err:                                                                                              │
  455.            │ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                      │
  456.            │   356 │   │   return obj, end                                                                                                           │
  457.            │   357                                                                                                                                   │
  458.            ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  459.            JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  460.  
  461. Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
  462. LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
  463.  
  464.  
  465. Provider List: https://docs.litellm.ai/docs/providers
  466.  
  467.  
  468. Provider List: https://docs.litellm.ai/docs/providers
  469.  
  470.  
  471. Provider List: https://docs.litellm.ai/docs/providers
  472.  
  473.  
  474. Provider List: https://docs.litellm.ai/docs/providers
  475.  
  476. Failed to execute tool call for tool paper_search.
  477.  + Exception Group Traceback (most recent call last):
  478.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  479.  |     content = await tool._tool_fn(
  480.  |               ^^^^^^^^^^^^^^^^^^^^
  481.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 127, in paper_search
  482.  |     index = await get_directory_index(settings=self.settings)
  483.  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  484.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 485, in get_directory_index
  485.  |     async with anyio.create_task_group() as tg:
  486.  |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 736, in __aexit__
  487.  |     raise BaseExceptionGroup(
  488.  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  489.  +-+---------------- 1 ----------------
  490.    | Traceback (most recent call last):
  491.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1230, in aembedding
  492.    |     openai_aclient: AsyncOpenAI = self._get_openai_client(  # type: ignore
  493.    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  494.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 608, in _get_openai_client
  495.    |     _new_client: Union[OpenAI, AsyncOpenAI] = AsyncOpenAI(
  496.    |                                               ^^^^^^^^^^^^
  497.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/openai/_client.py", line 319, in __init__
  498.    |     raise OpenAIError(
  499.    | openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  500.    |
  501.    | During handling of the above exception, another exception occurred:
  502.    |
  503.    | Traceback (most recent call last):
  504.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3224, in aembedding
  505.    |     response = await init_response
  506.    |                ^^^^^^^^^^^^^^^^^^^
  507.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1275, in aembedding
  508.    |     raise OpenAIError(
  509.    | litellm.llms.OpenAI.openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  510.    |
  511.    | During handling of the above exception, another exception occurred:
  512.    |
  513.    | Traceback (most recent call last):
  514.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 377, in process_file
  515.    |     await tmp_docs.aadd(
  516.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 383, in aadd
  517.    |     if await self.aadd_texts(texts, doc, all_settings, embedding_model):
  518.    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  519.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 428, in aadd_texts
  520.    |     await embedding_model.embed_documents(texts=[t.text for t in texts])
  521.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/llms.py", line 74, in embed_documents
  522.    |     response = await aembedding(
  523.    |                ^^^^^^^^^^^^^^^^^
  524.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1589, in wrapper_async
  525.    |     raise e
  526.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1409, in wrapper_async
  527.    |     result = await original_function(*args, **kwargs)
  528.    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  529.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3233, in aembedding
  530.    |     raise exception_type(
  531.    |           ^^^^^^^^^^^^^^^
  532.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 8199, in exception_type
  533.    |     raise e
  534.    |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 6489, in exception_type
  535.    |     raise AuthenticationError(
  536.    | litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  537.    +------------------------------------
  538.           Starting paper search for 'These searches use a combination of keywords related to SDN controllers, FANETs, and networking concepts to
  539.            retrieve relevant papers that can help answer the question. The year ranges are chosen to capture recent developments in this area, with
  540.            some searches focusing on more specific time periods (e.g., 2015-2024) and others covering a broader range of years (e.g., 2010-2024).'.
  541.           New file to index: Zhu et al_2023_Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric.pdf...
  542. [20:07:22] Failed to parse all of title, DOI, and authors from the ParsingSettings.structured_citation_prompt's response Here is the extracted
  543.            information in JSON format:
  544.  
  545.            ```
  546.            {
  547.                "title": "\"Traffic Flow Optimization for UAVs in Multi-Layer Information-Centric Software-Defined FANET.\"",
  548.                "authors": [
  549.                    "Zhu, Liehuang",
  550.                    "Md Monjurul Karim",
  551.                    "Kashif Sharif",
  552.                    "Chang Xu",
  553.                    "Fan Li"
  554.                ],
  555.                "doi": null
  556.            }
  557.            ```
  558.  
  559.            Note that the DOI (Digital Object Identifier) is not provided in the original citation, so it's set to `null` in the JSON output., consider
  560.           using a manifest file or specifying a different citation prompt.
  561.           ╭─────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────╮
  562.           │ /data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py:321 in aadd                                                      │
  563.           │                                                                                                                                         │
  564.           │   318 │   │   │   if clean_text.startswith("json"):                                                                                     │
  565.           │   319 │   │   │   │   clean_text = clean_text.replace("json", "", 1)                                                                    │
  566.           │   320 │   │   │   try:                                                                                                                  │
  567.           │ ❱ 321 │   │   │   │   citation_json = json.loads(clean_text)                                                                            │
  568.           │   322 │   │   │   │   if citation_title := citation_json.get("title"):                                                                  │
  569.           │   323 │   │   │   │   │   title = citation_title                                                                                        │
  570.           │   324 │   │   │   │   if citation_doi := citation_json.get("doi"):                                                                      │
  571.           │                                                                                                                                         │
  572.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/__init__.py:346 in loads                                                                  │
  573.           │                                                                                                                                         │
  574.           │   343 │   if (cls is None and object_hook is None and                                                                                   │
  575.           │   344 │   │   │   parse_int is None and parse_float is None and                                                                         │
  576.           │   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                                                     │
  577.           │ ❱ 346 │   │   return _default_decoder.decode(s)                                                                                         │
  578.           │   347 │   if cls is None:                                                                                                               │
  579.           │   348 │   │   cls = JSONDecoder                                                                                                         │
  580.           │   349 │   if object_hook is not None:                                                                                                   │
  581.           │                                                                                                                                         │
  582.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:337 in decode                                                                  │
  583.           │                                                                                                                                         │
  584.           │   334 │   │   containing a JSON document).                                                                                              │
  585.           │   335 │   │                                                                                                                             │
  586.           │   336 │   │   """                                                                                                                       │
  587.           │ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                         │
  588.           │   338 │   │   end = _w(s, end).end()                                                                                                    │
  589.           │   339 │   │   if end != len(s):                                                                                                         │
  590.           │   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                                                           │
  591.           │                                                                                                                                         │
  592.           │ /data5/miniconda3/envs/pq/lib/python3.11/json/decoder.py:355 in raw_decode                                                              │
  593.           │                                                                                                                                         │
  594.           │   352 │   │   try:                                                                                                                      │
  595.           │   353 │   │   │   obj, end = self.scan_once(s, idx)                                                                                     │
  596.           │   354 │   │   except StopIteration as err:                                                                                              │
  597.           │ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                      │
  598.           │   356 │   │   return obj, end                                                                                                           │
  599.           │   357                                                                                                                                   │
  600.           ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  601.           JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  602.  
  603. Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
  604. LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
  605.  
  606.  
  607. Provider List: https://docs.litellm.ai/docs/providers
  608.  
  609.  
  610. Provider List: https://docs.litellm.ai/docs/providers
  611.  
  612.  
  613. Provider List: https://docs.litellm.ai/docs/providers
  614.  
  615.  
  616. Provider List: https://docs.litellm.ai/docs/providers
  617.  
  618. Failed to execute tool call for tool paper_search.
  619.   + Exception Group Traceback (most recent call last):
  620.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  621.   |     content = await tool._tool_fn(
  622.   |               ^^^^^^^^^^^^^^^^^^^^
  623.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 127, in paper_search
  624.   |     index = await get_directory_index(settings=self.settings)
  625.   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  626.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 485, in get_directory_index
  627.   |     async with anyio.create_task_group() as tg:
  628.   |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 736, in __aexit__
  629.   |     raise BaseExceptionGroup(
  630.   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  631.   +-+---------------- 1 ----------------
  632.     | Traceback (most recent call last):
  633.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1230, in aembedding
  634.     |     openai_aclient: AsyncOpenAI = self._get_openai_client(  # type: ignore
  635.     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  636.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 608, in _get_openai_client
  637.     |     _new_client: Union[OpenAI, AsyncOpenAI] = AsyncOpenAI(
  638.     |                                               ^^^^^^^^^^^^
  639.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/openai/_client.py", line 319, in __init__
  640.     |     raise OpenAIError(
  641.     | openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  642.     |
  643.     | During handling of the above exception, another exception occurred:
  644.     |
  645.     | Traceback (most recent call last):
  646.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3224, in aembedding
  647.     |     response = await init_response
  648.     |                ^^^^^^^^^^^^^^^^^^^
  649.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/llms/OpenAI/openai.py", line 1275, in aembedding
  650.     |     raise OpenAIError(
  651.     | litellm.llms.OpenAI.openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  652.     |
  653.     | During handling of the above exception, another exception occurred:
  654.     |
  655.     | Traceback (most recent call last):
  656.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/search.py", line 377, in process_file
  657.     |     await tmp_docs.aadd(
  658.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 383, in aadd
  659.     |     if await self.aadd_texts(texts, doc, all_settings, embedding_model):
  660.     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  661.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/docs.py", line 428, in aadd_texts
  662.     |     await embedding_model.embed_documents(texts=[t.text for t in texts])
  663.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/llms.py", line 74, in embed_documents
  664.     |     response = await aembedding(
  665.     |                ^^^^^^^^^^^^^^^^^
  666.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1589, in wrapper_async
  667.     |     raise e
  668.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 1409, in wrapper_async
  669.     |     result = await original_function(*args, **kwargs)
  670.     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  671.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/main.py", line 3233, in aembedding
  672.     |     raise exception_type(
  673.     |           ^^^^^^^^^^^^^^^
  674.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 8199, in exception_type
  675.     |     raise e
  676.     |   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/litellm/utils.py", line 6489, in exception_type
  677.     |     raise AuthenticationError(
  678.     | litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  679.     +------------------------------------
  680. Failed to execute tool call for tool gather_evidence.
  681. Traceback (most recent call last):
  682.   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/aviary/env.py", line 197, in _exec_tool_call
  683.     content = await tool._tool_fn(
  684.               ^^^^^^^^^^^^^^^^^^^^
  685.   File "/data5/miniconda3/envs/pq/lib/python3.11/site-packages/paperqa/agents/tools.py", line 188, in gather_evidence
  686.     raise EmptyDocsError("Not gathering evidence due to having no papers.")
  687. paperqa.agents.tools.EmptyDocsError: Not gathering evidence due to having no papers.
  688.            Generating answer for 'How the SDN controller works within FANET?'.
  689. [20:07:26] Status: Paper Count=0 | Relevant Papers=0 | Current Evidence=0 | Current Cost=$0.0000
  690.            Answer: Within a Flying Ad-Hoc Network (FANET), the Software-Defined Networking (SDN) controller plays a crucial role in managing and
  691.            optimizing network communications. SDN is an architecture that decouples the control plane from the data plane, allowing for more efficient
  692.            and flexible network management (Example2012).
  693.  
  694.            In FANETs, the SDN controller acts as a central entity that collects and processes information about the network topology, node movements,
  695.            and link quality. This information is used to make intelligent decisions about network routing, flow control, and resource allocation
  696.            (Example2015). The controller uses this data to generate optimized routes for data transmission, taking into account factors such as node
  697.            mobility, channel conditions, and packet prioritization.
  698.  
  699.            The SDN controller also enables the implementation of advanced networking features in FANETs, such as Quality of Service (QoS) guarantees,
  700.            congestion control, and network slicing. These features are critical for supporting high-bandwidth applications and ensuring reliable
  701.            communication in dynamic and unpredictable environments (Example2017).
  702.  
  703.            References:
  704.  
  705.            * Example2012: (insert reference details)
  706.            * Example2015: (insert reference details)
  707.            * Example2017: (insert reference details)
  708.  
  709.            Note: The references provided are fictional, as the context does not provide any specific sources. Please replace with actual citations
  710.            from the context or valid keys if available.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement