Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'type' object is not subscriptable #6

Closed
knightmarehs opened this issue Mar 14, 2023 · 1 comment
Closed

'type' object is not subscriptable #6

knightmarehs opened this issue Mar 14, 2023 · 1 comment

Comments

@knightmarehs
Copy link

The exception can be fixed by replacing 'dict' to 'Dict'

from typing import Optional, Sequence, Union ... def openai_completion( prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]],
-->
from typing import Optional, Sequence, Union, Dict ... def openai_completion( prompts: Union[str, Sequence[str], Sequence[Dict[str, str]], Dict[str, str]],

@lxuechen
Copy link
Collaborator

Hi,

Thanks for your interest! Sorry, we weren't super clear about the python version. But we're using Python 3.10 as the default in our experiments.

Python 3.9 introduced typing with the builtin types, e.g., see this

We'll clarify this further when we release the code for training, and make sure we have a setup.py or equivalent config file then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants