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

build_conversation should take usermessage=None as default input #49

Closed
jose-moran opened this issue Sep 25, 2023 · 3 comments
Closed

Comments

@jose-moran
Copy link

Referencing this:

def build_conversation(context: Context, usermessage: str) -> Conversation:

Running on MacOS with zsh and using Python 3.11. Typically, I get this:

❯ copilot list directory
Traceback (most recent call last):
  File "/Users/jmoran/anaconda3/bin/copilot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/jmoran/anaconda3/lib/python3.11/site-packages/copilot/main.py", line 74, in main
    conversation = build_conversation(context)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: build_conversation() missing 1 required positional argument: 'usermessage'

But this is an easy fix: I imagine that the python version this was tested is <3.11. I suggest changing the function definition's first line to

def build_conversation(context: Context, usermessage: Optional[str]=None) -> Conversation:

which works fine for me (although I am not sure yet this doesn't break something else).

@github-actions
Copy link

Hey! Thanks for sharing feedback with the community!

@jose-moran jose-moran changed the title build_conversation take usermessage=None as default input build_conversation should take usermessage=None as default input Sep 25, 2023
@hariveliki
Copy link

@jose-moran THX

@JoelKronander
Copy link
Collaborator

fixed by PR

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

3 participants