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

LLM Provider problem #21

Open
emocat17 opened this issue Feb 22, 2025 · 4 comments
Open

LLM Provider problem #21

emocat17 opened this issue Feb 22, 2025 · 4 comments

Comments

@emocat17
Copy link

How to use Silicon-Flow APIs?

@emocat17
Copy link
Author

and use command "auto main" with Github AI token and OPen ROuter Api Key , Raise Error:
###############
(AutoAgent) PS F:\Gitworks\AutoAgent> auto main
['cd', 'F:\Gitworks\AutoAgent\workspace_meta_showcase\showcase_auto_agent\workplace', '&&', 'git', 'clone', '-b', 'autoagent_mirror',
'https://tjb-tech:[email protected]/HKUDS/AutoAgent.git']
⠋ Creating environment...
⠋ Creating environment...
remote: Enumerating objects: 774, done.
remote: Counting objects: 100% (17/17), done.
⠧ Creating environment...
remote: Total 774 (delta 2), reused 0 (delta 0), pack-reused 757 (from 4)
⠇ Creating environment...
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "F:\anaconda3\envs\AutoAgent\Scripts\auto.exe_main.py", line 7, in
File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1161, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Gitworks\AutoAgent\autoagent\cli.py", line 191, in main
code_env, web_env, file_env = create_environment(docker_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Gitworks\AutoAgent\autoagent\cli.py", line 149, in create_environment
code_env.init_container()
File "F:\Gitworks\AutoAgent\autoagent\environment\docker_env.py", line 66, in init_container
raise Exception(f"Failed to copy .env file to the AutoAgent directory. Error: {result.stderr}")
Exception: Failed to copy .env file to the AutoAgent directory. Error: 'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
###############################
means it need to creat a docker config? How to fix the error?

Thansk!

@tjb-tech
Copy link
Collaborator

How to use Silicon-Flow APIs?

Sorry for the late reply. You can refer to this method to handle the Silicon-Flow API: #17 (comment). In detail, you can use OpenAI-Compatible Endpoints.

@tjb-tech
Copy link
Collaborator

and use command "auto main" with Github AI token and OPen ROuter Api Key , Raise Error: ############### (AutoAgent) PS F:\Gitworks\AutoAgent> auto main ['cd', 'F:\Gitworks\AutoAgent\workspace_meta_showcase\showcase_auto_agent\workplace', '&&', 'git', 'clone', '-b', 'autoagent_mirror', 'https://tjb-tech:[email protected]/HKUDS/AutoAgent.git'] ⠋ Creating environment... ⠋ Creating environment... remote: Enumerating objects: 774, done. remote: Counting objects: 100% (17/17), done. ⠧ Creating environment... remote: Total 774 (delta 2), reused 0 (delta 0), pack-reused 757 (from 4) ⠇ Creating environment... Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in run_code File "F:\anaconda3\envs\AutoAgent\Scripts\auto.exe_main.py", line 7, in File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1161, in call return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1082, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1697, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda3\envs\AutoAgent\Lib\site-packages\click\core.py", line 788, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Gitworks\AutoAgent\autoagent\cli.py", line 191, in main code_env, web_env, file_env = create_environment(docker_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Gitworks\AutoAgent\autoagent\cli.py", line 149, in create_environment code_env.init_container() File "F:\Gitworks\AutoAgent\autoagent\environment\docker_env.py", line 66, in init_container raise Exception(f"Failed to copy .env file to the AutoAgent directory. Error: {result.stderr}") Exception: Failed to copy .env file to the AutoAgent directory. Error: 'cp' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 ############################### means it need to creat a docker config? How to fix the error?

Thansk!

It seems that you want to setup autoagent in the Windows platform but we use "cp"m command in unix system. We will fix it. Or you can use shutil lib. We will soon update the codebase to better support the windows platform.

@scooter7
Copy link

Hi,

On Windows, when attempting to install, I get the following:

Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [78 lines of output]
Compiling av\buffer.pyx because it changed.
[1/1] Cythonizing av\buffer.pyx
Compiling av\bytesource.pyx because it changed.
[1/1] Cythonizing av\bytesource.pyx
Compiling av\descriptor.pyx because it changed.
[1/1] Cythonizing av\descriptor.pyx
Compiling av\dictionary.pyx because it changed.
[1/1] Cythonizing av\dictionary.pyx
Compiling av\enum.pyx because it changed.
[1/1] Cythonizing av\enum.pyx
Compiling av\error.pyx because it changed.
[1/1] Cythonizing av\error.pyx
Compiling av\format.pyx because it changed.
[1/1] Cythonizing av\format.pyx
Compiling av\frame.pyx because it changed.
[1/1] Cythonizing av\frame.pyx
performance hint: av\logging.pyx:232:5: Exception check on 'log_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare 'log_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
2. Use an 'int' return type on 'log_callback' to allow an error code to be returned.

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  cdef const char *log_context_name(void *ptr) nogil:
      cdef log_context *obj = <log_context*>ptr
      return obj.name

  cdef lib.AVClass log_class
  log_class.item_name = log_context_name
                        ^
  ------------------------------------------------------------

  av\logging.pyx:216:22: Cannot assign type 'const char *(void *) except? NULL nogil' to 'const char *(*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of 'log_context_name'.

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

  # Start the magic!
  # We allow the user to fully disable the logging system as it will not play
  # nicely with subinterpreters due to FFmpeg-created threads.
  if os.environ.get('PYAV_LOGGING') != 'off':
      lib.av_log_set_callback(log_callback)
                              ^
  ------------------------------------------------------------

  av\logging.pyx:351:28: Cannot assign type 'void (void *, int, const char *, va_list) except * nogil' to 'av_log_callback' (alias of 'void (*)(void *, int, const char *, va_list) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'log_callback'.
  Compiling av\logging.pyx because it changed.
  [1/1] Cythonizing av\logging.pyx
  Traceback (most recent call last):
    File "C:\Users\Tori\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
      ~~~~^^
    File "C:\Users\Tori\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Tori\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
      self.run_setup()
      ~~~~~~~~~~~~~~^^
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
      super().run_setup(setup_script=setup_script)
      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
      exec(code, locals())
      ~~~~^^^^^^^^^^^^^^^^
    File "<string>", line 157, in <module>
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
      ~~~~~~~~~~~~~^^^^^^^
    File "C:\Users\Tori\AppData\Local\Temp\pip-build-env-jdiyb3cl\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: av\logging.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 24.3.1 -> 25.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

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