microsoft / graphrag

A modular graph-based Retrieval-Augmented Generation (RAG) system
https://microsoft.github.io/graphrag/
MIT License
16.85k stars 1.58k forks source link

[create_final_entities failes]: <Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.> #672

Closed unizhu closed 2 weeks ago

unizhu commented 1 month ago

Describe the issue

Follow the step by step on the website and run :

python -m graphrag.index --root ./graphrag

Steps to reproduce

  1. init the project / folder
  2. python -m graphrag.index --init --root ./graphrag
  3. python -m graphrag.index --root ./graphrag --> failed
  4. Tried to use 'text-embedding-3-large' on Azure but return : The chatCompletion operation does not work with the specified model, text-embedding-3-large. Please choose different model and try again.
  5. Tried to use 'gpt4-o' return: Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.

GraphRAG Config Used

Azure OpenAI API

embeddings:

parallelization: override the global parallelization settings for embeddings

async_mode: threaded # or asyncio llm: api_key: ${GRAPHRAG_API_KEY}

type: openai_embedding # or azure_openai_embedding

type: azure_openai_chat # or azure_openai_chat
# model: text-embedding-3-small
api_base: https://xxxx.openai.azure.com
# api_version: 2024-05-01-preview
api_version: 2024-05-01-preview
# organization: 4ca212a9-c38a-4420-a291-87626045aaaa
deployment_name: gpt4o
tokens_per_minute: 290_000 # set a leaky bucket throttle
# requests_per_minute: 10_000 # set a leaky bucket throttle
# max_retries: 10
# max_retry_wait: 10.0
# sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
# concurrent_requests: 25 # the number of parallel inflight requests that may be made
concurrent_requests: 5 # the number of parallel inflight requests that may be made
# batch_size: 16 # the number of documents to send in a single request
batch_size: 8 # the number of documents to send in a single request
# batch_max_tokens: 8191 # the maximum number of tokens to send in a single request
batch_max_tokens: 4095 # the maximum number of tokens to send in a single request
# target: required # or optional

Logs and screenshots

/anaconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.

{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"CHARLES DICKENS\":Charles Dickens is the author of \"A Christmas Carol,\" a classic novella first published in 1843.", "\"ARTHUR RACKHAM\":Arthur Rackham is the illustrator of this edition of \"A Christmas Carol,\" known for his distinctive and imaginative illustrations.", "\"J. B. LIPPINCOTT COMPANY\":J. B. Lippincott Company is the publishing house that published 'A Christmas Carol' in Philadelphia and New York. This edition of 'A Christmas Carol' was released by J. B. Lippincott Company in 1915.", "\"SUZANNE SHELL\":\"Suzanne Shell is one of the producers of this eBook version of 'A Christmas Carol,' contributing to its digital distribution.\"", "\"JANET BLENKINSHIP\":\"Janet Blenkinship is one of the producers of this eBook version of 'A Christmas Carol,' contributing to its digital distribution.\"", "\"ONLINE DISTRIBUTED PROOFREADING TEAM\":\"The Online Distributed Proofreading Team is a group that helped produce this eBook version of 'A Christmas Carol,' ensuring its accuracy and availability.\"", "\"PROJECT GUTENBERG\":Project Gutenberg is a digital library and a registered trademark that offers free eBooks, particularly those not protected by U.S. copyright law. It allows users to copy, distribute, and create derivative works from these eBooks under the terms of the Project Gutenberg License. The organization is dedicated to promoting the free distribution of electronic works, especially eBooks, and requires users to agree to specific terms of use to access its works. Project Gutenberg depends on public support and donations to increase the number of public domain and licensed works freely distributed in machine-readable form. Its mission is to provide free access to electronic works and to promote the sharing of these works in compliance with its terms.", "\"UNITED STATES\":The United States is a country where the copyright status of works is specifically mentioned, and where the use and distribution of Project Gutenberg's eBooks are subject to specific copyright laws. Under certain conditions, these eBooks can be used freely in the United States under the Project Gutenberg License. Additionally, the United States is relevant in the context of financial matters, including securities and tax treatment for international donations, ensuring compliance with U.S. laws. The Project Gutenberg Literary Archive Foundation operates within the United States and adheres to state laws regulating charitable donations.", "\"A CHRISTMAS CAROL\":\"A Christmas Carol\" is a novella by Charles Dickens, first published in 1843, and is a classic Christmas story. This literary work has also been digitized and distributed by Project Gutenberg.", "\"PHILADELPHIA\":\"Philadelphia is one of the locations where 'A Christmas Carol' was published by J. B. Lippincott Company.\"", "\"NEW YORK\":\"New York is one of the locations where 'A Christmas Carol' was published by J. B. Lippincott Company.\"", "\"BOB CRATCHIT\":Bob Cratchit is a character in Charles Dickens' \"A Christmas Carol,\" who serves as the clerk for Ebenezer Scrooge. Despite his low income, Bob lives in a modest four-roomed house that is blessed by the Spirit. He is a devoted family man, married to Mrs. Cratchit, and the father of several children, including the frail but optimistic Tiny Tim. Bob is depicted as a joyful and affectionate individual, often expressing happiness and being affectionately kissed by his family members.\n\nBob Cratchit is known for his appreciation of his wife's cooking, particularly praising a pudding she made as her greatest success since their marriage. He is also seen enjoying himself by sliding down a slide on Cornhill, celebrating Christmas Eve with a festive spirit. His home is significant in the narrative, as it is visited by Scrooge and the Ghost, highlighting Bob's importance in the story.\n\nAs an employee of Scrooge, Bob struggles to support his family and is often scrutinized by his employer, especially when he arrives late to the office. However, his dedication and pleas for assistance eventually lead Scrooge to promise him a raise and support for his struggling family. Bob is also the intended recipient of a buck that Scrooge sends anonymously, further indicating Scrooge's change of heart.\n\nBob Cratchit is characterized by his high spirits, care for his children, and his role as a loving father and husband. He serves drinks to his family with beaming looks and proposes a toast for a merry Christmas, embodying the warmth and joy of the holiday season. Additionally, he discusses potential job opportunities for his son Peter, showing his concern for his family's future. Overall, Bob Cratchit is a symbol of familial love, resilience, and the transformative power of kindness.", "\"EBENEZER SCROOGE\":Ebenezer Scrooge is a central character known for his miserly and unkind nature. He is a grasping, covetous old man and the surviving partner of the firm of Scrooge and Marley. Scrooge is visited by the ghost of his former business partner, Jacob Marley, which marks the beginning of a series of supernatural encounters. During these encounters, Scrooge is confronted with a vision of his own neglected grave, leading to a moment of self-realization, fear, and self-reflection. This pivotal moment prompts him to vow to change his ways. Despite his perplexity over the unusual circumstances, including mentions in the context of a financial document, Scrooge seeks comfort and understanding from the Ghosts that visit him.", "\"PETER CRATCHIT\":Peter Cratchit is one of Bob Cratchit's children. He is known for shaking hands with his father, Bob Cratchit.", "\"TIM CRATCHIT\":\"Tim Cratchit, also known as Tiny Tim, is the youngest son of Bob Cratchit and is a cripple.\"", "\"MR. FEZZIWIG\":Mr. Fezziwig is a character who, along with Mrs. Fezziwig, hosts a domestic ball and wishes everyone a Merry Christmas as they leave. He is a kind-hearted and jovial old merchant."]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"EXTERNAL WEATHER CONDITIONS\":", "\"BEGGARS\":", "\"CHILDREN\":", "\"BLIND MEN'S DOGS\":", "\"HUMAN SYMPATHY\":", "\"THE CITY\":\"The City\" is a bustling urban area where Scrooge and the Ghost observe the Christmas-time activities and busy streets. It represents a shift from the school to a more dynamic environment, filled with shadowy passengers, merchants, and business activities. The City seems to spring up around Scrooge and the Phantom, symbolizing societal issues and possibly representing society or a specific urban area. It is also the location where Scrooge's business friends are, who would be surprised by his emotional display. The City is described as having foggy and cold weather, with people trying to keep warm. As Scrooge and the Spirit move to different settings, The City vanishes, indicating transitions to new scenes, such as an open country road or passing through a wall.", "\"SCROOGE'S CLERK\":Scrooge's Clerk works in a dismal little cell, copying letters, and struggles to keep warm due to Scrooge's control over the coal supply. This individual, who works for Scrooge, is also visited by the Spirit and Scrooge during their journey.", "\"SCROOGE'S NEPHEW\":Scrooge's Nephew is a character known for his hearty and infectious laugh, which brings joy and good humor to those around him. He is a cheerful and optimistic individual who tries to spread Christmas cheer to his uncle, Ebenezer Scrooge, despite Scrooge's initially dismissive attitude. Scrooge's Nephew often greets Scrooge with a \"Merry Christmas\" and a blessing, and he consistently invites Scrooge to dine with him, expressing a desire to be friends and to engage Scrooge in Christmas celebrations.\n\nHe describes Scrooge as a comical old fellow and comments on his wealth and its lack of utility. Despite being rebuffed, Scrooge's Nephew maintains a friendly and festive attitude towards his uncle and pleads with him to embrace the Christmas spirit, seeing it as a time of kindness and charity. He feels both sympathy and frustration towards Scrooge, showing mixed feelings about his uncle's behavior.\n\nScrooge's Nephew is also involved in social gatherings and games, where he expresses opinions about young housekeepers and enjoys the company of others. He experiences secret joy when his wife beats her sisters in a game and is implied to be in cahoots with Topper during the festivities, suggesting a playful or mischievous nature. He participates in the game Yes and No, where he thinks of an animal and answers questions about it.\n\nAdditionally, Scrooge's Nephew is mentioned as the child of a woman who died, indicating a familial relationship with Scrooge. His hearty laugh surprises Scrooge during a contemplative moment, and Scrooge eventually decides to visit him, further highlighting their familial bond. Overall, Scrooge's Nephew is a good-natured character who tries to engage Scrooge in the joy and spirit of Christmas, despite the challenges posed by Scrooge's initial reluctance.", "\"NEPHEW\":\"The Nephew is a character who engages in a conversation with Scrooge, advocating for merriment and challenging Scrooge's negative outlook.\"", "\"CHRISTMAS\":Christmas is a recurring event in the narrative, associated with various scenes and emotions, including Scrooge's reflections and the boy singing a carol. It is a time of year noted for its significance in terms of charity and the contrast between Want and Abundance. Central to the conversation between Scrooge and his nephew, Christmas represents a time of celebration that Scrooge initially finds ridiculous. However, it is also described as a time of kindness, forgiveness, and charity, which Scrooge's Nephew values highly despite Scrooge's disdain.\n\nChristmas is mentioned as a time of merrymaking, which Scrooge does not initially participate in. It serves as the context within which the story unfolds, involving themes of toys, presents, and supernatural occurrences. The event contributes to the festive and communal atmosphere, influencing the actions and emotions of the characters. It is during Christmas that Scrooge vows to honor the holiday in his heart and keep it all year round, symbolizing his commitment to change.\n\nThe festive occasion influences the lively and cheerful atmosphere in the shop, with customers and the grocer's people in high spirits. It is the holiday being celebrated, which brings about a significant change in Scrooge's behavior and interactions with others. During Christmas, Scrooge promises to raise Bob Cratchit's salary and assist his family, marking a notable transformation in his character. The Cratchit family celebrates Christmas with a special meal and festive activities, highlighting the holiday's importance in the narrative.\n\nOverall, Christmas is the central event during which the story takes place, shaping the actions, atmosphere, and character development throughout the text.", "\"CHRISTMAS-TIME\":\"Christmas-time\" is described as a good, kind, forgiving, charitable, and pleasant time when people open their hearts and think of others as fellow-passengers to the grave. It is the season during which the events and conversations are taking place, noted for its cold weather and characterized by seasonal activities.", "\"THE CLERK\":The Clerk is a character in the story who works for Scrooge and earns fifteen shillings a week. Despite his modest means, he is excited about Christmas Eve and engages in festive activities. The Clerk involuntarily applauds positive sentiments about Christmas-time but is quickly reprimanded by Scrooge. He requests a day off for Christmas and promises to come in early the next morning, demonstrating his subservient and hopeful nature. The Clerk is expectant of being allowed a day off and quickly prepares to leave when the workday ends. He has a wife and family and is warmer in spirit than Scrooge. At one point, Scrooge wishes to speak to the Clerk, indicating a moment of regret or realization.", "\"THE PORTLY GENTLEMEN\":\"The Portly Gentlemen are two pleasant-looking individuals who enter Scrooge's office after Scrooge's nephew leaves. They visit Scrooge's office with books and papers, seeking a charitable contribution.\"", "\"SCROOGE AND MARLEY'S\":\"Scrooge and Marley's\" is a business firm where Scrooge and Marley were partners. It is referenced by the portly gentlemen. Additionally, \"Scrooge and Marley's\" serves as the counting-house where Scrooge works, indicating his professional background.", "\"BEDLAM\":\"Bedlam is a historical reference to the Bethlem Royal Hospital, a psychiatric hospital in London, used here metaphorically by Scrooge.\"", "\"THE GENTLEMAN\":\"The Gentleman\" is a character who advocates for making provisions for the poor and destitute, representing a more charitable perspective. He engages in a conversation with Scrooge, challenging his views on supporting the poor. In his efforts, The Gentleman is trying to raise funds to help the poor by providing them with meat, drink, and warmth. He also interacts with Scrooge, expressing surprise and gratitude at Scrooge's generosity."]}}
{"type": "error", "data": "Error executing verb \"text_embed\" in create_final_entities: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 415, in _execute_verb\n    result = await result\n             ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 105, in text_embed\n    return await _text_embed_in_memory(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 130, in _text_embed_in_memory\n    result = await strategy_exec(texts, callbacks, cache, strategy_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 61, in run\n    embeddings = await _execute(llm, text_batches, ticker, semaphore)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 105, in _execute\n    results = await asyncio.gather(*futures)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 99, in embed\n    chunk_embeddings = await llm(chunk)\n                       ^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/json_parsing_llm.py\", line 34, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_token_replacing_llm.py\", line 37, in __call__\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_history_tracking_llm.py\", line 33, in __call__\n    output = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/caching_llm.py\", line 104, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 177, in __call__\n    result, start = await execute_with_retry()\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 159, in execute_with_retry\n    async for attempt in retryer:\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/_asyncio.py\", line 71, in __anext__\n    do = self.iter(retry_state=self._retry_state)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/__init__.py\", line 314, in iter\n    return fut.result()\n           ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 449, in result\n    return self.__get_result()\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 401, in __get_result\n    raise self._exception\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 165, in execute_with_retry\n    return await do_attempt(), start\n           ^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 147, in do_attempt\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 49, in __call__\n    return await self._invoke(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": null}
{"type": "error", "data": "Error running pipeline!", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/run.py\", line 323, in run_pipeline\n    result = await workflow.run(context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 369, in run\n    timing = await self._execute_verb(node, context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 415, in _execute_verb\n    result = await result\n             ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 105, in text_embed\n    return await _text_embed_in_memory(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 130, in _text_embed_in_memory\n    result = await strategy_exec(texts, callbacks, cache, strategy_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 61, in run\n    embeddings = await _execute(llm, text_batches, ticker, semaphore)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 105, in _execute\n    results = await asyncio.gather(*futures)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 99, in embed\n    chunk_embeddings = await llm(chunk)\n                       ^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/json_parsing_llm.py\", line 34, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_token_replacing_llm.py\", line 37, in __call__\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_history_tracking_llm.py\", line 33, in __call__\n    output = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/caching_llm.py\", line 104, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 177, in __call__\n    result, start = await execute_with_retry()\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 159, in execute_with_retry\n    async for attempt in retryer:\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/_asyncio.py\", line 71, in __anext__\n    do = self.iter(retry_state=self._retry_state)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/__init__.py\", line 314, in iter\n    return fut.result()\n           ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 449, in result\n    return self.__get_result()\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 401, in __get_result\n    raise self._exception\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 165, in execute_with_retry\n    return await do_attempt(), start\n           ^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 147, in do_attempt\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 49, in __call__\n    return await self._invoke(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": null}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"FRED\":Fred is the nephew of Ebenezer Scrooge, often referred to simply as Scrooge's nephew. He is a character who embodies the joy and spirit of Christmas, contrasting sharply with Scrooge's initial disbelief and miserly attitude. Fred expresses gratitude and wishes his uncle a merry Christmas and a happy New Year, demonstrating his positive and warm-hearted nature. He is known for his hearty laughter and his belief in the joy of Christmas. Fred is also involved in a guessing game and expresses admiration and merriment towards his uncle. Despite Scrooge's initial coldness, Fred warmly welcomes him to dinner, indicating a positive and forgiving relationship. He is surprised but welcoming when Scrooge arrives for dinner, showing his open-heartedness. Additionally, Fred discusses Scrooge's wealth and its lack of benefit to others, highlighting his contrasting values to those of his uncle.", "\"GHOST OF CHRISTMAS PAST\":The Ghost of Christmas Past is a phantom that shows things from the past. This spirit visits Scrooge and is characterized by a soft and gentle voice, representing Scrooge's past.", "\"GHOST OF CHRISTMAS PRESENT\":The Ghost of Christmas Present is a supernatural entity that appears to Ebenezer Scrooge in Charles Dickens' \"A Christmas Carol.\" This spirit is characterized by a deep green robe bordered with white fur, a holly wreath on its head, and a joyful, genial demeanor. Known for its kind, generous, and hearty nature, the Ghost of Christmas Present invites Scrooge to know it better and guides him through various experiences to teach him important lessons. During its visit, the spirit shows Scrooge scenes of joy and generosity, aiming to impart valuable insights. The Ghost of Christmas Present is also noted for having sat in a specific corner during a previous visit to Scrooge.", "\"GHOST OF CHRISTMAS YET TO COME\":The Ghost of Christmas Yet to Come is a mysterious and silent spirit that fills Scrooge with dread and shows him visions of the future. This apparition reveals the shadows of things which yet may happen, providing a glimpse into potential future events.", "\"GHOST OF JACOB MARLEY\":The Ghost of Jacob Marley is the spectre of Scrooge's former partner in business.", "\"JOE\":Joe is a character who is engaged in a conversation with a woman about the belongings of a deceased man. He is involved in a discussion about bed-curtains, where he questions the actions of another character, displaying a sense of humor and practicality. Joe is a marine-store dealer and receiver of stolen goods, who appraises and purchases items from others with a frugal and somewhat humorous attitude. As an old man involved in trade or transactions, Joe shows a tendency to be generous to ladies but remains cautious about overextending his generosity.", "\"MR. TOPPER\":\"Mr. Topper is a bachelor.\"", "\"DICK WILKINS\":Dick Wilkins is a former fellow apprentice of Scrooge. He was very much attached to Scrooge and is remembered fondly by him.", "\"BELLE\":Belle is a comely matron and an old sweetheart of Scrooge. She is the wife of the master of the house, who mentions seeing Mr. Scrooge, indicating that she has a past connection with him.", "\"CAROLINE\":Caroline is a character who is the wife of one of Scrooge's debtors. She is depicted as a mild and patient woman who experiences a range of emotions upon hearing the news of a man's death. Initially, she feels relief and a lighter heart due to the death of the merciless creditor, but this is soon followed by a sense of remorse.", "\"MRS. CRATCHIT\":Mrs. Cratchit is the wife of Bob Cratchit and a central figure in the Cratchit family. She is depicted as a loving and affectionate partner, often showing her affection by kissing Bob and engaging in conversations with him about their son, Tiny Tim. Despite being poorly dressed, she makes a good show with cheap ribbons, demonstrating her resourcefulness and pride in her appearance.\n\nMrs. Cratchit is industrious and works alongside her daughters, contributing significantly to the household preparations, particularly during the Christmas meal. She is responsible for making the gravy, carving the goose, and taking up and bringing in the pudding, which she is particularly proud of. Her cooking, especially the pudding, is described as a great success, and she is delighted with the dinner.\n\nAs a mother, Mrs. Cratchit is very affectionate and concerned about the well-being and whereabouts of her children and husband. She warmly welcomes her family and is actively involved in their discussions and hopes. She also interacts with her son Peter and other family members, showing her deep involvement in family life.\n\nMrs. Cratchit expresses strong feelings against Ebenezer Scrooge, calling him odious and unfeeling, and wishes to give him a piece of her mind. Despite her disdain for Scrooge, she remains a supportive and integral part of the Cratchit family, embodying the spirit of resilience and warmth.", "\"BELINDA CRATCHIT\":Belinda Cratchit is the second daughter of Bob and Mrs. Cratchit. She is described as being brave and is often seen dressed in ribbons. Belinda assists her mother in laying the cloth, contributing to the household tasks.", "\"MARTHA CRATCHIT\":Martha Cratchit is a daughter of Bob and Mrs. Cratchit, and a member of the Cratchit family. She is noted for being late last Christmas Day by half an hour.", "\"MRS. DILBER\":Mrs. Dilber is a laundress who plays a notable role in the appraisal and sale of a deceased man's belongings. She is involved in conversations about the importance of taking care of oneself and the consequences of one's actions in life. Known for her bold demeanor, Mrs. Dilber is addressed by another woman in the parlour, indicating her familiarity with the group. She brings various items, including sheets, towels, and silver teaspoons, to Joe for appraisal and sale, highlighting her active participation in the assessment of the deceased man's possessions.", "\"FAN\":Fan is a little girl who is Scrooge's younger sister. She brings him the news that he can come home.", "\"MRS. FEZZIWIG\":Mrs. Fezziwig is the partner and wife of Mr. Fezziwig. She is equally skilled and enthusiastic about dancing, making her a worthy partner in every sense. Mrs. Fezziwig shares in the cheerful activities of the domestic ball, participating in the festive dancing and hosting the event alongside Mr. Fezziwig. She is characterized by her substantial smile, which reflects her cheerful and welcoming nature. Together, the Fezziwigs wish everyone a Merry Christmas as they leave the ball, highlighting their warm and hospitable demeanor."]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"SCROOGE\":Scrooge is a central character in the narrative, initially known for his stern, miserly, and unkind nature. He is Bob Cratchit's employer and Fred's uncle, and he is initially portrayed as a tight-fisted, covetous old sinner, more intent and unyielding than the harshest weather. Scrooge is avoided by everyone, including beggars, children, and even blind men's dogs, who sense his malevolence. He expresses strong disdain for Christmas, preferring to be left alone during the holiday season, and is skeptical about charitable activities, questioning the necessity of providing for the poor and destitute.\n\nScrooge's journey begins with his interaction with the ghost of his deceased partner, Jacob Marley, who warns him about his fate and the upcoming visits of three spirits. Throughout the narrative, Scrooge is guided by various spirits, including the Ghost of Christmas Past, Present, and Yet to Come. These supernatural encounters lead him to reflect deeply on his past actions, his present behavior, and the potential consequences for his future.\n\nAs he travels with the spirits, Scrooge experiences a wide range of emotions, from fear, horror, and solemn dread to joy, ecstasy, and fervor. He observes scenes from his past, including his time as an apprentice at a warehouse, his interactions with his family, and his former self's melancholy and regret. He also witnesses the present conditions of the Cratchit family and the potential future outcomes if he does not change his ways.\n\nScrooge's transformation is profound. He becomes more reflective and observant, showing a newfound interest and concern for others, particularly Tiny Tim. He expresses joy and determination to live in the Past, Present, and Future, and he becomes generous and kind, promising to raise Bob Cratchit's salary and assist his family. Scrooge's change in behavior is evident as he engages positively with others, showing generosity and kindness, and becoming irresistibly pleasant and engaging.\n\nBy the end of the narrative, Scrooge is a character who has undergone a significant transformation, becoming joyful, reflective, and determined to change his ways. He shows gratitude, seeks social interaction, and expresses a newfound interest in the well-being of others, particularly Tiny Tim. Scrooge's journey from a miserly, unkind man to a generous and kind-hearted individual is a central theme of the story, highlighting the power of redemption and the impact of kindness on others.\n\n", "\"MARLEY'S GHOST\":\"Marley's Ghost\" is a spectral figure that appears to Ebenezer Scrooge, causing him great perplexity and leading him to question whether his experiences are real or a dream. This phantom, known to Scrooge, is characterized by its chains, which symbolize the burden of past actions. Marley's Ghost is described as wearing a pigtail, waistcoat, tights, boots, and dragging a heavy chain, signifying its ghostly presence. The apparition of Marley is a significant event in the narrative, as it warns Scrooge and leads him to witness other phantoms, thereby playing a crucial role in the story.", "\"THE FIRST OF THE THREE SPIRITS\":\"The First of the Three Spirits\" is an event mentioned in the text that signifies the beginning of Scrooge's supernatural encounters with spirits.", "\"THE SECOND OF THE THREE SPIRITS\":\"The Second of the Three Spirits is an event mentioned in the text.\"", "\"THE LAST OF THE SPIRITS\":\"The Last of the Spirits is an event mentioned in the text.\"", "\"THE END OF IT\":\"The End of It is an event mentioned in the text.\"", "\"CORNHILL\":Cornhill is a location mentioned where Bob Cratchit slides down a lane of boys, indicating it is a place of activity, celebration, and festivity.", "\"FEZZIWIG\":Fezziwig is an older gentleman who is remembered fondly by Scrooge as his former employer during his apprenticeship. He is a jovial and benevolent character, known for his rich, fat, and comfortable voice. Fezziwig is an energetic and authoritative figure who oversees the clearing of the warehouse and the preparation for a ball-room event. He is highly skilled in dancing and is capable of leading a large group of dancers with enthusiasm and liveliness. Fezziwig is praised by his apprentices for his ability to make them happy through his actions, despite spending only a small amount of money. He encourages others to stop working and celebrate Christmas Eve, embodying a positive and cheerful demeanor, especially during the domestic ball. Fezziwig's festive and lively personality is highlighted by his participation in the dance with Mrs. Fezziwig and his role in clapping his hands to stop the dance and praise the participants.", "\"OLD SCRATCH\":\"Old Scratch\" is a colloquial term often used to refer to the devil or a mischievous character. It is frequently mentioned in literature to denote a malevolent figure. In the context provided, \"Old Scratch\" is used to indicate that someone has met their fate or passed away.", "\"CHRISTMAS EVE\":\"Christmas Eve\" is the day on which the events described in the text take place, characterized by cold, bleak, and foggy weather. It is the occasion being celebrated by Bob Cratchit and others, marking a time of joy and festivity. The significance of Christmas Eve is highlighted by the clerk's request for a day off, reflecting its importance as a time of celebration. During this festive occasion, Fezziwig calls for no more work, creating a joyful and festive atmosphere. Additionally, the day is marked by the clerk's festive activities and Scrooge's disdain, further emphasizing the contrasting attitudes towards the holiday.", "\"MARLEY\":Marley is Scrooge's former business partner who has been dead for seven years. His death is confirmed by multiple individuals, including a clergyman, a clerk, an undertaker, and the chief mourner. Despite his death, Marley remains a significant presence in the narrative, haunting Scrooge both supernaturally and psychologically. His face appears supernaturally on the knocker of Scrooge's door and on the Dutch tiles around the fireplace, evoking a sense of horror with ghostly spectacles and a dismal light. Marley is described as a ghostly figure with a pigtail, usual waistcoat, tights, and boots, bound by a chain made of cash-boxes, keys, padlocks, ledgers, deeds, and heavy purses wrought in steel. His body is transparent, and he is known for having no bowels. Marley's past liberality and his connection to Scrooge are highlighted through various references, including the hearth that had never known such a mighty blaze in Scrooge's time or his own. His presence and the events surrounding his death have left a lasting impression on Scrooge, influencing his cautious behavior and thoughts.", "\"MARLEY'S FUNERAL\":\"Marley's Funeral is an event that is mentioned to emphasize Marley's death and Scrooge's reaction to it.\"", "\"ST. PAUL'S CHURCHYARD\":St. Paul's Churchyard is a location mentioned as a breezy spot where a middle-aged gentleman might stroll or turn out after dark.", "\"HAMLET'S FATHER\":\"Hamlet's Father is a character who is known to have died before the events of the play 'Hamlet' begin.\"", "\"OLD MARLEY\":\"Old Marley is a character whose name remains on the warehouse door of the firm 'Scrooge and Marley' even after his death.\"", "\"SCROOGE AND MARLEY\":\"Scrooge and Marley is a firm known by the names of its two partners, Scrooge and Old Marley.\""]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"UNION WORKHOUSES\":\"Union Workhouses are institutions mentioned by Scrooge, indicating their role in providing for the poor through forced labor.\"", "\"THE TREADMILL\":\"The Treadmill\" is an establishment mentioned by Scrooge, which is in full operation and serves a specific function in society. It is an institution associated with the enforcement of labor for the poor.", "\"THE POOR LAW\":\"The Poor Law\" is a legislative framework mentioned by Scrooge, designed to provide relief for the poor through workhouses and other means. It is another establishment referenced by Scrooge, which is in full operation and serves to support those who are badly off.", "\"THE ANCIENT TOWER OF A CHURCH\":The Ancient Tower of a Church is a location characterized by its gruff old bell, which signifies its age and historical presence. This bell is notably described as peeping slyly down at Scrooge from a Gothic window, adding a touch of personality and intrigue to the setting.", "\"THE MAIN STREET\":\"The Main Street is a location where labourers are repairing gas-pipes and where a great fire in a brazier is lit, attracting ragged men and boys.\"", "\"THE COURT\":\"The Court is a location at the corner of the main street where some labourers are working.\"", "\"THE SHOPS\":\"The Shops are described as bright, with holly sprigs and berries in the windows, making pale faces ruddy as they pass.\"", "\"LORD MAYOR\":\"The Lord Mayor is a high-ranking official who resides in the Mansion House and oversees a large household, including fifty cooks and butlers. He is responsible for giving orders to keep Christmas in a grand manner.\"", "\"MANSION HOUSE\":\"The Mansion House is a significant building where the Lord Mayor resides and manages his household.\"", "\"ST. DUNSTAN\":St. Dunstan is a historical or legendary figure mentioned in the context of using weather to combat the Evil Spirit. He is referenced as a figure who could have used the cold weather to punish the Evil Spirit, indicating his role in folklore or a religious context.", "\"EVIL SPIRIT\":\"The Evil Spirit is a malevolent entity mentioned in the context of being affected by the cold weather.\"", "\"LITTLE TAILOR\":\"The little tailor is a character who was fined by the Lord Mayor for being drunk and bloodthirsty in the streets. He is preparing pudding in his garret while his wife and baby go out to buy beef.\"", "\"LITTLE TAILOR'S WIFE\":\"The little tailor's wife is a lean woman who, along with her baby, goes out to buy beef while her husband prepares pudding.\"", "\"LITTLE TAILOR'S BABY\":\"The little tailor's baby accompanies the wife to buy beef.\"", "\"THE SINGER\":\"The Singer is a character who attempts to sing a Christmas carol at Scrooge's keyhole but flees in terror when Scrooge reacts aggressively.\"", "\"THE EVIL SPIRIT\":\"The Evil Spirit is mentioned in a hypothetical scenario where St. Dunstan could have punished it with cold weather, indicating its role in folklore or religious context.\""]}}

Additional Information

unizhu commented 1 month ago

Seems like gpt4o does not support chat completion. will request gpt3.5 or gpt4 turbo and try again

chongchongaikubao commented 1 month ago

Describe the issue

Follow the step by step on the website and run :

python -m graphrag.index --root ./graphrag

Steps to reproduce

  1. init the project / folder
  2. python -m graphrag.index --init --root ./graphrag
  3. python -m graphrag.index --root ./graphrag --> failed
  4. Tried to use 'text-embedding-3-large' on Azure but return : The chatCompletion operation does not work with the specified model, text-embedding-3-large. Please choose different model and try again.
  5. Tried to use 'gpt4-o' return: Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.

GraphRAG Config Used

Azure OpenAI API

embeddings:

parallelization: override the global parallelization settings for embeddings

async_mode: threaded # or asyncio llm: api_key: ${GRAPHRAG_API_KEY} # type: openai_embedding # or azure_openai_embedding type: azure_openai_chat # or azure_openai_chat # model: text-embedding-3-small api_base: https://xxxx.openai.azure.com # api_version: 2024-05-01-preview api_version: 2024-05-01-preview # organization: 4ca212a9-c38a-4420-a291-87626045aaaa deployment_name: gpt4o tokens_per_minute: 290_000 # set a leaky bucket throttle # requests_per_minute: 10_000 # set a leaky bucket throttle # max_retries: 10 # max_retry_wait: 10.0 # sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times # concurrent_requests: 25 # the number of parallel inflight requests that may be made concurrent_requests: 5 # the number of parallel inflight requests that may be made # batch_size: 16 # the number of documents to send in a single request batch_size: 8 # the number of documents to send in a single request # batch_max_tokens: 8191 # the maximum number of tokens to send in a single request batch_max_tokens: 4095 # the maximum number of tokens to send in a single request # target: required # or optional

Logs and screenshots

/anaconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.

{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"CHARLES DICKENS\":Charles Dickens is the author of \"A Christmas Carol,\" a classic novella first published in 1843.", "\"ARTHUR RACKHAM\":Arthur Rackham is the illustrator of this edition of \"A Christmas Carol,\" known for his distinctive and imaginative illustrations.", "\"J. B. LIPPINCOTT COMPANY\":J. B. Lippincott Company is the publishing house that published 'A Christmas Carol' in Philadelphia and New York. This edition of 'A Christmas Carol' was released by J. B. Lippincott Company in 1915.", "\"SUZANNE SHELL\":\"Suzanne Shell is one of the producers of this eBook version of 'A Christmas Carol,' contributing to its digital distribution.\"", "\"JANET BLENKINSHIP\":\"Janet Blenkinship is one of the producers of this eBook version of 'A Christmas Carol,' contributing to its digital distribution.\"", "\"ONLINE DISTRIBUTED PROOFREADING TEAM\":\"The Online Distributed Proofreading Team is a group that helped produce this eBook version of 'A Christmas Carol,' ensuring its accuracy and availability.\"", "\"PROJECT GUTENBERG\":Project Gutenberg is a digital library and a registered trademark that offers free eBooks, particularly those not protected by U.S. copyright law. It allows users to copy, distribute, and create derivative works from these eBooks under the terms of the Project Gutenberg License. The organization is dedicated to promoting the free distribution of electronic works, especially eBooks, and requires users to agree to specific terms of use to access its works. Project Gutenberg depends on public support and donations to increase the number of public domain and licensed works freely distributed in machine-readable form. Its mission is to provide free access to electronic works and to promote the sharing of these works in compliance with its terms.", "\"UNITED STATES\":The United States is a country where the copyright status of works is specifically mentioned, and where the use and distribution of Project Gutenberg's eBooks are subject to specific copyright laws. Under certain conditions, these eBooks can be used freely in the United States under the Project Gutenberg License. Additionally, the United States is relevant in the context of financial matters, including securities and tax treatment for international donations, ensuring compliance with U.S. laws. The Project Gutenberg Literary Archive Foundation operates within the United States and adheres to state laws regulating charitable donations.", "\"A CHRISTMAS CAROL\":\"A Christmas Carol\" is a novella by Charles Dickens, first published in 1843, and is a classic Christmas story. This literary work has also been digitized and distributed by Project Gutenberg.", "\"PHILADELPHIA\":\"Philadelphia is one of the locations where 'A Christmas Carol' was published by J. B. Lippincott Company.\"", "\"NEW YORK\":\"New York is one of the locations where 'A Christmas Carol' was published by J. B. Lippincott Company.\"", "\"BOB CRATCHIT\":Bob Cratchit is a character in Charles Dickens' \"A Christmas Carol,\" who serves as the clerk for Ebenezer Scrooge. Despite his low income, Bob lives in a modest four-roomed house that is blessed by the Spirit. He is a devoted family man, married to Mrs. Cratchit, and the father of several children, including the frail but optimistic Tiny Tim. Bob is depicted as a joyful and affectionate individual, often expressing happiness and being affectionately kissed by his family members.\n\nBob Cratchit is known for his appreciation of his wife's cooking, particularly praising a pudding she made as her greatest success since their marriage. He is also seen enjoying himself by sliding down a slide on Cornhill, celebrating Christmas Eve with a festive spirit. His home is significant in the narrative, as it is visited by Scrooge and the Ghost, highlighting Bob's importance in the story.\n\nAs an employee of Scrooge, Bob struggles to support his family and is often scrutinized by his employer, especially when he arrives late to the office. However, his dedication and pleas for assistance eventually lead Scrooge to promise him a raise and support for his struggling family. Bob is also the intended recipient of a buck that Scrooge sends anonymously, further indicating Scrooge's change of heart.\n\nBob Cratchit is characterized by his high spirits, care for his children, and his role as a loving father and husband. He serves drinks to his family with beaming looks and proposes a toast for a merry Christmas, embodying the warmth and joy of the holiday season. Additionally, he discusses potential job opportunities for his son Peter, showing his concern for his family's future. Overall, Bob Cratchit is a symbol of familial love, resilience, and the transformative power of kindness.", "\"EBENEZER SCROOGE\":Ebenezer Scrooge is a central character known for his miserly and unkind nature. He is a grasping, covetous old man and the surviving partner of the firm of Scrooge and Marley. Scrooge is visited by the ghost of his former business partner, Jacob Marley, which marks the beginning of a series of supernatural encounters. During these encounters, Scrooge is confronted with a vision of his own neglected grave, leading to a moment of self-realization, fear, and self-reflection. This pivotal moment prompts him to vow to change his ways. Despite his perplexity over the unusual circumstances, including mentions in the context of a financial document, Scrooge seeks comfort and understanding from the Ghosts that visit him.", "\"PETER CRATCHIT\":Peter Cratchit is one of Bob Cratchit's children. He is known for shaking hands with his father, Bob Cratchit.", "\"TIM CRATCHIT\":\"Tim Cratchit, also known as Tiny Tim, is the youngest son of Bob Cratchit and is a cripple.\"", "\"MR. FEZZIWIG\":Mr. Fezziwig is a character who, along with Mrs. Fezziwig, hosts a domestic ball and wishes everyone a Merry Christmas as they leave. He is a kind-hearted and jovial old merchant."]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"EXTERNAL WEATHER CONDITIONS\":", "\"BEGGARS\":", "\"CHILDREN\":", "\"BLIND MEN'S DOGS\":", "\"HUMAN SYMPATHY\":", "\"THE CITY\":\"The City\" is a bustling urban area where Scrooge and the Ghost observe the Christmas-time activities and busy streets. It represents a shift from the school to a more dynamic environment, filled with shadowy passengers, merchants, and business activities. The City seems to spring up around Scrooge and the Phantom, symbolizing societal issues and possibly representing society or a specific urban area. It is also the location where Scrooge's business friends are, who would be surprised by his emotional display. The City is described as having foggy and cold weather, with people trying to keep warm. As Scrooge and the Spirit move to different settings, The City vanishes, indicating transitions to new scenes, such as an open country road or passing through a wall.", "\"SCROOGE'S CLERK\":Scrooge's Clerk works in a dismal little cell, copying letters, and struggles to keep warm due to Scrooge's control over the coal supply. This individual, who works for Scrooge, is also visited by the Spirit and Scrooge during their journey.", "\"SCROOGE'S NEPHEW\":Scrooge's Nephew is a character known for his hearty and infectious laugh, which brings joy and good humor to those around him. He is a cheerful and optimistic individual who tries to spread Christmas cheer to his uncle, Ebenezer Scrooge, despite Scrooge's initially dismissive attitude. Scrooge's Nephew often greets Scrooge with a \"Merry Christmas\" and a blessing, and he consistently invites Scrooge to dine with him, expressing a desire to be friends and to engage Scrooge in Christmas celebrations.\n\nHe describes Scrooge as a comical old fellow and comments on his wealth and its lack of utility. Despite being rebuffed, Scrooge's Nephew maintains a friendly and festive attitude towards his uncle and pleads with him to embrace the Christmas spirit, seeing it as a time of kindness and charity. He feels both sympathy and frustration towards Scrooge, showing mixed feelings about his uncle's behavior.\n\nScrooge's Nephew is also involved in social gatherings and games, where he expresses opinions about young housekeepers and enjoys the company of others. He experiences secret joy when his wife beats her sisters in a game and is implied to be in cahoots with Topper during the festivities, suggesting a playful or mischievous nature. He participates in the game Yes and No, where he thinks of an animal and answers questions about it.\n\nAdditionally, Scrooge's Nephew is mentioned as the child of a woman who died, indicating a familial relationship with Scrooge. His hearty laugh surprises Scrooge during a contemplative moment, and Scrooge eventually decides to visit him, further highlighting their familial bond. Overall, Scrooge's Nephew is a good-natured character who tries to engage Scrooge in the joy and spirit of Christmas, despite the challenges posed by Scrooge's initial reluctance.", "\"NEPHEW\":\"The Nephew is a character who engages in a conversation with Scrooge, advocating for merriment and challenging Scrooge's negative outlook.\"", "\"CHRISTMAS\":Christmas is a recurring event in the narrative, associated with various scenes and emotions, including Scrooge's reflections and the boy singing a carol. It is a time of year noted for its significance in terms of charity and the contrast between Want and Abundance. Central to the conversation between Scrooge and his nephew, Christmas represents a time of celebration that Scrooge initially finds ridiculous. However, it is also described as a time of kindness, forgiveness, and charity, which Scrooge's Nephew values highly despite Scrooge's disdain.\n\nChristmas is mentioned as a time of merrymaking, which Scrooge does not initially participate in. It serves as the context within which the story unfolds, involving themes of toys, presents, and supernatural occurrences. The event contributes to the festive and communal atmosphere, influencing the actions and emotions of the characters. It is during Christmas that Scrooge vows to honor the holiday in his heart and keep it all year round, symbolizing his commitment to change.\n\nThe festive occasion influences the lively and cheerful atmosphere in the shop, with customers and the grocer's people in high spirits. It is the holiday being celebrated, which brings about a significant change in Scrooge's behavior and interactions with others. During Christmas, Scrooge promises to raise Bob Cratchit's salary and assist his family, marking a notable transformation in his character. The Cratchit family celebrates Christmas with a special meal and festive activities, highlighting the holiday's importance in the narrative.\n\nOverall, Christmas is the central event during which the story takes place, shaping the actions, atmosphere, and character development throughout the text.", "\"CHRISTMAS-TIME\":\"Christmas-time\" is described as a good, kind, forgiving, charitable, and pleasant time when people open their hearts and think of others as fellow-passengers to the grave. It is the season during which the events and conversations are taking place, noted for its cold weather and characterized by seasonal activities.", "\"THE CLERK\":The Clerk is a character in the story who works for Scrooge and earns fifteen shillings a week. Despite his modest means, he is excited about Christmas Eve and engages in festive activities. The Clerk involuntarily applauds positive sentiments about Christmas-time but is quickly reprimanded by Scrooge. He requests a day off for Christmas and promises to come in early the next morning, demonstrating his subservient and hopeful nature. The Clerk is expectant of being allowed a day off and quickly prepares to leave when the workday ends. He has a wife and family and is warmer in spirit than Scrooge. At one point, Scrooge wishes to speak to the Clerk, indicating a moment of regret or realization.", "\"THE PORTLY GENTLEMEN\":\"The Portly Gentlemen are two pleasant-looking individuals who enter Scrooge's office after Scrooge's nephew leaves. They visit Scrooge's office with books and papers, seeking a charitable contribution.\"", "\"SCROOGE AND MARLEY'S\":\"Scrooge and Marley's\" is a business firm where Scrooge and Marley were partners. It is referenced by the portly gentlemen. Additionally, \"Scrooge and Marley's\" serves as the counting-house where Scrooge works, indicating his professional background.", "\"BEDLAM\":\"Bedlam is a historical reference to the Bethlem Royal Hospital, a psychiatric hospital in London, used here metaphorically by Scrooge.\"", "\"THE GENTLEMAN\":\"The Gentleman\" is a character who advocates for making provisions for the poor and destitute, representing a more charitable perspective. He engages in a conversation with Scrooge, challenging his views on supporting the poor. In his efforts, The Gentleman is trying to raise funds to help the poor by providing them with meat, drink, and warmth. He also interacts with Scrooge, expressing surprise and gratitude at Scrooge's generosity."]}}
{"type": "error", "data": "Error executing verb \"text_embed\" in create_final_entities: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 415, in _execute_verb\n    result = await result\n             ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 105, in text_embed\n    return await _text_embed_in_memory(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 130, in _text_embed_in_memory\n    result = await strategy_exec(texts, callbacks, cache, strategy_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 61, in run\n    embeddings = await _execute(llm, text_batches, ticker, semaphore)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 105, in _execute\n    results = await asyncio.gather(*futures)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 99, in embed\n    chunk_embeddings = await llm(chunk)\n                       ^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/json_parsing_llm.py\", line 34, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_token_replacing_llm.py\", line 37, in __call__\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_history_tracking_llm.py\", line 33, in __call__\n    output = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/caching_llm.py\", line 104, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 177, in __call__\n    result, start = await execute_with_retry()\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 159, in execute_with_retry\n    async for attempt in retryer:\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/_asyncio.py\", line 71, in __anext__\n    do = self.iter(retry_state=self._retry_state)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/__init__.py\", line 314, in iter\n    return fut.result()\n           ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 449, in result\n    return self.__get_result()\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 401, in __get_result\n    raise self._exception\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 165, in execute_with_retry\n    return await do_attempt(), start\n           ^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 147, in do_attempt\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 49, in __call__\n    return await self._invoke(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": null}
{"type": "error", "data": "Error running pipeline!", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/run.py\", line 323, in run_pipeline\n    result = await workflow.run(context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 369, in run\n    timing = await self._execute_verb(node, context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/datashaper/workflow/workflow.py\", line 415, in _execute_verb\n    result = await result\n             ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 105, in text_embed\n    return await _text_embed_in_memory(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/text_embed.py\", line 130, in _text_embed_in_memory\n    result = await strategy_exec(texts, callbacks, cache, strategy_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 61, in run\n    embeddings = await _execute(llm, text_batches, ticker, semaphore)\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 105, in _execute\n    results = await asyncio.gather(*futures)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/index/verbs/text/embed/strategies/openai.py\", line 99, in embed\n    chunk_embeddings = await llm(chunk)\n                       ^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/json_parsing_llm.py\", line 34, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_token_replacing_llm.py\", line 37, in __call__\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_history_tracking_llm.py\", line 33, in __call__\n    output = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/caching_llm.py\", line 104, in __call__\n    result = await self._delegate(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 177, in __call__\n    result, start = await execute_with_retry()\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 159, in execute_with_retry\n    async for attempt in retryer:\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/_asyncio.py\", line 71, in __anext__\n    do = self.iter(retry_state=self._retry_state)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/tenacity/__init__.py\", line 314, in iter\n    return fut.result()\n           ^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 449, in result\n    return self.__get_result()\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line 401, in __get_result\n    raise self._exception\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 165, in execute_with_retry\n    return await do_attempt(), start\n           ^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/rate_limiting_llm.py\", line 147, in do_attempt\n    return await self._delegate(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 49, in __call__\n    return await self._invoke(input, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": null}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"FRED\":Fred is the nephew of Ebenezer Scrooge, often referred to simply as Scrooge's nephew. He is a character who embodies the joy and spirit of Christmas, contrasting sharply with Scrooge's initial disbelief and miserly attitude. Fred expresses gratitude and wishes his uncle a merry Christmas and a happy New Year, demonstrating his positive and warm-hearted nature. He is known for his hearty laughter and his belief in the joy of Christmas. Fred is also involved in a guessing game and expresses admiration and merriment towards his uncle. Despite Scrooge's initial coldness, Fred warmly welcomes him to dinner, indicating a positive and forgiving relationship. He is surprised but welcoming when Scrooge arrives for dinner, showing his open-heartedness. Additionally, Fred discusses Scrooge's wealth and its lack of benefit to others, highlighting his contrasting values to those of his uncle.", "\"GHOST OF CHRISTMAS PAST\":The Ghost of Christmas Past is a phantom that shows things from the past. This spirit visits Scrooge and is characterized by a soft and gentle voice, representing Scrooge's past.", "\"GHOST OF CHRISTMAS PRESENT\":The Ghost of Christmas Present is a supernatural entity that appears to Ebenezer Scrooge in Charles Dickens' \"A Christmas Carol.\" This spirit is characterized by a deep green robe bordered with white fur, a holly wreath on its head, and a joyful, genial demeanor. Known for its kind, generous, and hearty nature, the Ghost of Christmas Present invites Scrooge to know it better and guides him through various experiences to teach him important lessons. During its visit, the spirit shows Scrooge scenes of joy and generosity, aiming to impart valuable insights. The Ghost of Christmas Present is also noted for having sat in a specific corner during a previous visit to Scrooge.", "\"GHOST OF CHRISTMAS YET TO COME\":The Ghost of Christmas Yet to Come is a mysterious and silent spirit that fills Scrooge with dread and shows him visions of the future. This apparition reveals the shadows of things which yet may happen, providing a glimpse into potential future events.", "\"GHOST OF JACOB MARLEY\":The Ghost of Jacob Marley is the spectre of Scrooge's former partner in business.", "\"JOE\":Joe is a character who is engaged in a conversation with a woman about the belongings of a deceased man. He is involved in a discussion about bed-curtains, where he questions the actions of another character, displaying a sense of humor and practicality. Joe is a marine-store dealer and receiver of stolen goods, who appraises and purchases items from others with a frugal and somewhat humorous attitude. As an old man involved in trade or transactions, Joe shows a tendency to be generous to ladies but remains cautious about overextending his generosity.", "\"MR. TOPPER\":\"Mr. Topper is a bachelor.\"", "\"DICK WILKINS\":Dick Wilkins is a former fellow apprentice of Scrooge. He was very much attached to Scrooge and is remembered fondly by him.", "\"BELLE\":Belle is a comely matron and an old sweetheart of Scrooge. She is the wife of the master of the house, who mentions seeing Mr. Scrooge, indicating that she has a past connection with him.", "\"CAROLINE\":Caroline is a character who is the wife of one of Scrooge's debtors. She is depicted as a mild and patient woman who experiences a range of emotions upon hearing the news of a man's death. Initially, she feels relief and a lighter heart due to the death of the merciless creditor, but this is soon followed by a sense of remorse.", "\"MRS. CRATCHIT\":Mrs. Cratchit is the wife of Bob Cratchit and a central figure in the Cratchit family. She is depicted as a loving and affectionate partner, often showing her affection by kissing Bob and engaging in conversations with him about their son, Tiny Tim. Despite being poorly dressed, she makes a good show with cheap ribbons, demonstrating her resourcefulness and pride in her appearance.\n\nMrs. Cratchit is industrious and works alongside her daughters, contributing significantly to the household preparations, particularly during the Christmas meal. She is responsible for making the gravy, carving the goose, and taking up and bringing in the pudding, which she is particularly proud of. Her cooking, especially the pudding, is described as a great success, and she is delighted with the dinner.\n\nAs a mother, Mrs. Cratchit is very affectionate and concerned about the well-being and whereabouts of her children and husband. She warmly welcomes her family and is actively involved in their discussions and hopes. She also interacts with her son Peter and other family members, showing her deep involvement in family life.\n\nMrs. Cratchit expresses strong feelings against Ebenezer Scrooge, calling him odious and unfeeling, and wishes to give him a piece of her mind. Despite her disdain for Scrooge, she remains a supportive and integral part of the Cratchit family, embodying the spirit of resilience and warmth.", "\"BELINDA CRATCHIT\":Belinda Cratchit is the second daughter of Bob and Mrs. Cratchit. She is described as being brave and is often seen dressed in ribbons. Belinda assists her mother in laying the cloth, contributing to the household tasks.", "\"MARTHA CRATCHIT\":Martha Cratchit is a daughter of Bob and Mrs. Cratchit, and a member of the Cratchit family. She is noted for being late last Christmas Day by half an hour.", "\"MRS. DILBER\":Mrs. Dilber is a laundress who plays a notable role in the appraisal and sale of a deceased man's belongings. She is involved in conversations about the importance of taking care of oneself and the consequences of one's actions in life. Known for her bold demeanor, Mrs. Dilber is addressed by another woman in the parlour, indicating her familiarity with the group. She brings various items, including sheets, towels, and silver teaspoons, to Joe for appraisal and sale, highlighting her active participation in the assessment of the deceased man's possessions.", "\"FAN\":Fan is a little girl who is Scrooge's younger sister. She brings him the news that he can come home.", "\"MRS. FEZZIWIG\":Mrs. Fezziwig is the partner and wife of Mr. Fezziwig. She is equally skilled and enthusiastic about dancing, making her a worthy partner in every sense. Mrs. Fezziwig shares in the cheerful activities of the domestic ball, participating in the festive dancing and hosting the event alongside Mr. Fezziwig. She is characterized by her substantial smile, which reflects her cheerful and welcoming nature. Together, the Fezziwigs wish everyone a Merry Christmas as they leave the ball, highlighting their warm and hospitable demeanor."]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"SCROOGE\":Scrooge is a central character in the narrative, initially known for his stern, miserly, and unkind nature. He is Bob Cratchit's employer and Fred's uncle, and he is initially portrayed as a tight-fisted, covetous old sinner, more intent and unyielding than the harshest weather. Scrooge is avoided by everyone, including beggars, children, and even blind men's dogs, who sense his malevolence. He expresses strong disdain for Christmas, preferring to be left alone during the holiday season, and is skeptical about charitable activities, questioning the necessity of providing for the poor and destitute.\n\nScrooge's journey begins with his interaction with the ghost of his deceased partner, Jacob Marley, who warns him about his fate and the upcoming visits of three spirits. Throughout the narrative, Scrooge is guided by various spirits, including the Ghost of Christmas Past, Present, and Yet to Come. These supernatural encounters lead him to reflect deeply on his past actions, his present behavior, and the potential consequences for his future.\n\nAs he travels with the spirits, Scrooge experiences a wide range of emotions, from fear, horror, and solemn dread to joy, ecstasy, and fervor. He observes scenes from his past, including his time as an apprentice at a warehouse, his interactions with his family, and his former self's melancholy and regret. He also witnesses the present conditions of the Cratchit family and the potential future outcomes if he does not change his ways.\n\nScrooge's transformation is profound. He becomes more reflective and observant, showing a newfound interest and concern for others, particularly Tiny Tim. He expresses joy and determination to live in the Past, Present, and Future, and he becomes generous and kind, promising to raise Bob Cratchit's salary and assist his family. Scrooge's change in behavior is evident as he engages positively with others, showing generosity and kindness, and becoming irresistibly pleasant and engaging.\n\nBy the end of the narrative, Scrooge is a character who has undergone a significant transformation, becoming joyful, reflective, and determined to change his ways. He shows gratitude, seeks social interaction, and expresses a newfound interest in the well-being of others, particularly Tiny Tim. Scrooge's journey from a miserly, unkind man to a generous and kind-hearted individual is a central theme of the story, highlighting the power of redemption and the impact of kindness on others.\n\n", "\"MARLEY'S GHOST\":\"Marley's Ghost\" is a spectral figure that appears to Ebenezer Scrooge, causing him great perplexity and leading him to question whether his experiences are real or a dream. This phantom, known to Scrooge, is characterized by its chains, which symbolize the burden of past actions. Marley's Ghost is described as wearing a pigtail, waistcoat, tights, boots, and dragging a heavy chain, signifying its ghostly presence. The apparition of Marley is a significant event in the narrative, as it warns Scrooge and leads him to witness other phantoms, thereby playing a crucial role in the story.", "\"THE FIRST OF THE THREE SPIRITS\":\"The First of the Three Spirits\" is an event mentioned in the text that signifies the beginning of Scrooge's supernatural encounters with spirits.", "\"THE SECOND OF THE THREE SPIRITS\":\"The Second of the Three Spirits is an event mentioned in the text.\"", "\"THE LAST OF THE SPIRITS\":\"The Last of the Spirits is an event mentioned in the text.\"", "\"THE END OF IT\":\"The End of It is an event mentioned in the text.\"", "\"CORNHILL\":Cornhill is a location mentioned where Bob Cratchit slides down a lane of boys, indicating it is a place of activity, celebration, and festivity.", "\"FEZZIWIG\":Fezziwig is an older gentleman who is remembered fondly by Scrooge as his former employer during his apprenticeship. He is a jovial and benevolent character, known for his rich, fat, and comfortable voice. Fezziwig is an energetic and authoritative figure who oversees the clearing of the warehouse and the preparation for a ball-room event. He is highly skilled in dancing and is capable of leading a large group of dancers with enthusiasm and liveliness. Fezziwig is praised by his apprentices for his ability to make them happy through his actions, despite spending only a small amount of money. He encourages others to stop working and celebrate Christmas Eve, embodying a positive and cheerful demeanor, especially during the domestic ball. Fezziwig's festive and lively personality is highlighted by his participation in the dance with Mrs. Fezziwig and his role in clapping his hands to stop the dance and praise the participants.", "\"OLD SCRATCH\":\"Old Scratch\" is a colloquial term often used to refer to the devil or a mischievous character. It is frequently mentioned in literature to denote a malevolent figure. In the context provided, \"Old Scratch\" is used to indicate that someone has met their fate or passed away.", "\"CHRISTMAS EVE\":\"Christmas Eve\" is the day on which the events described in the text take place, characterized by cold, bleak, and foggy weather. It is the occasion being celebrated by Bob Cratchit and others, marking a time of joy and festivity. The significance of Christmas Eve is highlighted by the clerk's request for a day off, reflecting its importance as a time of celebration. During this festive occasion, Fezziwig calls for no more work, creating a joyful and festive atmosphere. Additionally, the day is marked by the clerk's festive activities and Scrooge's disdain, further emphasizing the contrasting attitudes towards the holiday.", "\"MARLEY\":Marley is Scrooge's former business partner who has been dead for seven years. His death is confirmed by multiple individuals, including a clergyman, a clerk, an undertaker, and the chief mourner. Despite his death, Marley remains a significant presence in the narrative, haunting Scrooge both supernaturally and psychologically. His face appears supernaturally on the knocker of Scrooge's door and on the Dutch tiles around the fireplace, evoking a sense of horror with ghostly spectacles and a dismal light. Marley is described as a ghostly figure with a pigtail, usual waistcoat, tights, and boots, bound by a chain made of cash-boxes, keys, padlocks, ledgers, deeds, and heavy purses wrought in steel. His body is transparent, and he is known for having no bowels. Marley's past liberality and his connection to Scrooge are highlighted through various references, including the hearth that had never known such a mighty blaze in Scrooge's time or his own. His presence and the events surrounding his death have left a lasting impression on Scrooge, influencing his cautious behavior and thoughts.", "\"MARLEY'S FUNERAL\":\"Marley's Funeral is an event that is mentioned to emphasize Marley's death and Scrooge's reaction to it.\"", "\"ST. PAUL'S CHURCHYARD\":St. Paul's Churchyard is a location mentioned as a breezy spot where a middle-aged gentleman might stroll or turn out after dark.", "\"HAMLET'S FATHER\":\"Hamlet's Father is a character who is known to have died before the events of the play 'Hamlet' begin.\"", "\"OLD MARLEY\":\"Old Marley is a character whose name remains on the warehouse door of the firm 'Scrooge and Marley' even after his death.\"", "\"SCROOGE AND MARLEY\":\"Scrooge and Marley is a firm known by the names of its two partners, Scrooge and Old Marley.\""]}}
{"type": "error", "data": "Error Invoking LLM", "stack": "Traceback (most recent call last):\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/base/base_llm.py\", line 53, in _invoke\n    output = await self._execute_llm(input, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/graphrag/llm/openai/openai_chat_llm.py\", line 55, in _execute_llm\n    completion = await self.client.chat.completions.create(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/resources/chat/completions.py\", line 1295, in create\n    return await self._post(\n           ^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1826, in post\n    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1519, in request\n    return await self._request(\n           ^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/uniabc/anaconda3/lib/python3.11/site-packages/openai/_base_client.py\", line 1620, in _request\n    raise self._make_status_error_from_response(err.response) from None\nopenai.BadRequestError: Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}\n", "source": "Error code: 400 - {'error': {'message': \"Invalid type for 'messages[0].content[0]': expected an object, but got a string instead.\", 'type': 'invalid_request_error', 'param': 'messages[0].content[0]', 'code': 'invalid_type'}}", "details": {"input": ["\"UNION WORKHOUSES\":\"Union Workhouses are institutions mentioned by Scrooge, indicating their role in providing for the poor through forced labor.\"", "\"THE TREADMILL\":\"The Treadmill\" is an establishment mentioned by Scrooge, which is in full operation and serves a specific function in society. It is an institution associated with the enforcement of labor for the poor.", "\"THE POOR LAW\":\"The Poor Law\" is a legislative framework mentioned by Scrooge, designed to provide relief for the poor through workhouses and other means. It is another establishment referenced by Scrooge, which is in full operation and serves to support those who are badly off.", "\"THE ANCIENT TOWER OF A CHURCH\":The Ancient Tower of a Church is a location characterized by its gruff old bell, which signifies its age and historical presence. This bell is notably described as peeping slyly down at Scrooge from a Gothic window, adding a touch of personality and intrigue to the setting.", "\"THE MAIN STREET\":\"The Main Street is a location where labourers are repairing gas-pipes and where a great fire in a brazier is lit, attracting ragged men and boys.\"", "\"THE COURT\":\"The Court is a location at the corner of the main street where some labourers are working.\"", "\"THE SHOPS\":\"The Shops are described as bright, with holly sprigs and berries in the windows, making pale faces ruddy as they pass.\"", "\"LORD MAYOR\":\"The Lord Mayor is a high-ranking official who resides in the Mansion House and oversees a large household, including fifty cooks and butlers. He is responsible for giving orders to keep Christmas in a grand manner.\"", "\"MANSION HOUSE\":\"The Mansion House is a significant building where the Lord Mayor resides and manages his household.\"", "\"ST. DUNSTAN\":St. Dunstan is a historical or legendary figure mentioned in the context of using weather to combat the Evil Spirit. He is referenced as a figure who could have used the cold weather to punish the Evil Spirit, indicating his role in folklore or a religious context.", "\"EVIL SPIRIT\":\"The Evil Spirit is a malevolent entity mentioned in the context of being affected by the cold weather.\"", "\"LITTLE TAILOR\":\"The little tailor is a character who was fined by the Lord Mayor for being drunk and bloodthirsty in the streets. He is preparing pudding in his garret while his wife and baby go out to buy beef.\"", "\"LITTLE TAILOR'S WIFE\":\"The little tailor's wife is a lean woman who, along with her baby, goes out to buy beef while her husband prepares pudding.\"", "\"LITTLE TAILOR'S BABY\":\"The little tailor's baby accompanies the wife to buy beef.\"", "\"THE SINGER\":\"The Singer is a character who attempts to sing a Christmas carol at Scrooge's keyhole but flees in terror when Scrooge reacts aggressively.\"", "\"THE EVIL SPIRIT\":\"The Evil Spirit is mentioned in a hypothetical scenario where St. Dunstan could have punished it with cold weather, indicating its role in folklore or religious context.\""]}}

Additional Information

  • GraphRAG Version:
  • Operating System: macos
  • Python Version: python3.11.5
  • Related Issues:

解决了吗

natoverse commented 1 month ago

Seems like gpt4o does not support chat completion. will request gpt3.5 or gpt4 turbo and try again

Have you tried this recently with gpt-4o? We've been using it quite a lot lately with no issues.

github-actions[bot] commented 3 weeks ago

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] commented 2 weeks ago

This issue has been closed after being marked as stale for five days. Please reopen if needed.

NguyenDinhTiem commented 1 week ago

I have same problem when I create an agent from tools. I fixed it by checking my prompt, remove some "," between sentences. Error promt: prompt = ("sentence1", "sentence2) Correct promt: promt=("sentence1," "sentence2")

Then It worked ^^. You can try it, maybe help !