From 4a933b39c3d6ea72ac2d5e56e77a64e7a0e9d03b Mon Sep 17 00:00:00 2001 From: Sanjib Narzary Date: Sun, 2 Apr 2023 10:25:22 +0530 Subject: [PATCH] TypeError: 'type' object is not subscriptable `TypeError: 'type' object is not subscriptable` is solved --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 0d47b5f5..9e512ee4 100644 --- a/utils.py +++ b/utils.py @@ -6,7 +6,7 @@ import sys import time import json -from typing import Optional, Sequence, Union +from typing import Optional, Sequence, Union, Dict import openai import tqdm @@ -37,7 +37,7 @@ class OpenAIDecodingArguments(object): def openai_completion( - prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]], + prompts: Union[str, Sequence[str], Sequence[Dict[str, str]], Dict[str, str]], decoding_args: OpenAIDecodingArguments, model_name="text-davinci-003", sleep_time=2,