Coder Social home page Coder Social logo

Comments (3)

Rai220 avatar Rai220 commented on July 17, 2024 1

Добрый день. Попробуйте обновиться до самой последней версии gigachain и связаных библиотек.

from gigachain.

hookenful avatar hookenful commented on July 17, 2024

Вроде починил. Включил в Windows по умолчанию UTF-8 кодировку. Сейчас другая ошибка

Traceback (most recent call last):
  File "C:\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Python311\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\_subprocess.py", line 78, in subprocess_started
    target(sockets=sockets)
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\server.py", line 69, in serve
    await self._serve(sockets)
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\server.py", line 76, in _serve
    config.load()
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\config.py", line 433, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\uvicorn\importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\api\main.py", line 15, in <module>
    from chat import ask_question, getChatHistory
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\api\chat.py", line 11, in <module>
    from langchain.agents import Agent
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\langchain\agents\__init__.py", line 60, in <module>
    from langchain.agents.gigachat_functions_agent.base import (
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\langchain\agents\gigachat_functions_agent\base.py", line 4, in <module>
    from langchain_community.tools.render import format_tool_to_gigachat_function
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\langchain_community\tools\render.py", line 9, in <module>
    from langchain_community.utils.gigachat_functions import (
  File "C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\langchain_community\utils\gigachat_functions.py", line 3, in <module>
    from langchain_core.utils.function_calling import (
ImportError: cannot import name 'convert_pydantic_to_gigachat_function' from 'langchain_core.utils.function_calling' (C:\Users\hooki\Documents\coffeeface\src\ai-chat\.venv\Lib\site-packages\langchain_core\utils\function_calling.py)

Насколько я вижу в langchain_core\utils\function_calling.py нет и не может быть функции convert_pydantic_to_gigachat_function

from gigachain.

hookenful avatar hookenful commented on July 17, 2024

Добрый день. Попробуйте обновиться до самой последней версии gigachain и связаных библиотек.

Спасибо, получилось!
Ещё заметил, что в зависимостях была библиотека langchain-core. Убрал, обновил gigachain через ключ -U и заработало.

from gigachain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.