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

Modified main.py:158 'get_avatar()' #5

Open
KenDingel opened this issue Sep 24, 2023 · 1 comment
Open

Modified main.py:158 'get_avatar()' #5

KenDingel opened this issue Sep 24, 2023 · 1 comment

Comments

@KenDingel
Copy link

KenDingel commented Sep 24, 2023

Based on localagi.py, the following function has two arguments
def get_avatar(self, input_text)

In main.py line 158, the call of that function is

def display_avatar(agi, input_text=STABLEDIFFUSION_PROMPT, model=STABLEDIFFUSION_MODEL):
    image_url = agi.get_avatar(input_text, model)

Which leads the the following error

✔ Container localagi-api-1  Started                                                                          0.3s
2023-09-24 12:50:03.117 | INFO     | __main__:<module>:366 - Creating LocalAGI instance
2023-09-24 12:50:03.117 | INFO     | __main__:<module>:387 - Welcome to LocalAGI
2023-09-24 12:50:03.117 | INFO     | __main__:<module>:391 - Creating avatar, please wait...
Traceback (most recent call last):
 File "/app/./main.py", line 392, in <module>
   display_avatar(localagi)
 File "/app/./main.py", line 158, in display_avatar
   image_url = agi.get_avatar(input_text, model)
TypeError: LocalAGI.get_avatar() takes 2 positional arguments but 3 were given

I modified the line to
image_url = agi.get_avatar(input_text)

Building the container now, will update on the result.
UPDATE: IT WORKED, but I had to change something else too in get_avatar
api_base=self.api_base+"/v1" There was a typo

@scenaristeur
Copy link
Contributor

Same error for me .
adding --skip-avatar starts without changing anything, but i've got now avatar

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