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

KeyError: 'Invalid LangServe PyProject.toml' #164

Open
2 tasks done
akaUNik opened this issue Jul 2, 2024 · 0 comments
Open
2 tasks done

KeyError: 'Invalid LangServe PyProject.toml' #164

akaUNik opened this issue Jul 2, 2024 · 0 comments

Comments

@akaUNik
Copy link

akaUNik commented Jul 2, 2024

Контрольный список

  • Добавлен исчерпывающий заголовок.
  • Приложена ссылка на страницу, на которой обнаружена проблема (если применимо).

Проблема с существующей документацией:

Packege-ы, в которых в PyProject.toml нет рвздела [tool.langserve], не устанавливаются.
% gigachain app add summarize-anthropic

/Users/dmitry/.pyenv/versions/3.11.9/envs/ai/lib/python3.11/site-packages/langchain_cli/utils/pa │
│ ckages.py:45 in get_langserve_export │
│ │
│ 42 │ │ attr = data["tool"]["langserve"]["export_attr"] │
│ 43 │ │ package_name = data["tool"]["poetry"]["name"] │
│ 44 │ except KeyError as e: │
│ ❱ 45 │ │ raise KeyError("Invalid LangServe PyProject.toml") from e │
│ 46 │ return LangServeExport(module=module, attr=attr, package_name=package_name) │
│ 47 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ data = {'tool': {'poetry': {'name': 'summarize-anthropic', 'version': '0.1.0', │ │
│ │ 'description': "This template uses Anthropic's Claude2 to summarize long │ │
│ │ documents.", 'authors': ['Lance Martin [email protected]'], 'readme': │ │
│ │ 'README.md', 'dependencies': {'python': '>=3.8.1,<4.0', 'gigachain': '^0.1', │ │
│ │ 'langchainhub': '>=0.1.13', 'gigachain-anthropic': '^0.1.4'}, 'group': {'dev': │ │
│ │ {'dependencies': {'gigachain-cli': '>=0.0.21'}}}}, 'templates-hub': {'use-case': │ │
│ │ 'summarization', 'author': 'LangChain', 'integrations': ['Anthropic'], 'tags': │ │
│ │ ['summarization']}}, 'build-system': {'requires': ['poetry-core'], │ │
│ │ 'build-backend': 'poetry.core.masonry.api'}} │ │
│ │ f = <_io.TextIOWrapper name='/Users/dmitry/Library/Application │ │
│ │ Support/langchain/git_repos/ai_forever_gigachain_git_b7cf9490/templates/summariz… │ │
│ │ mode='r' encoding='UTF-8'> │ │
│ │ filepath = PosixPath('/Users/dmitry/Library/Application │ │
│ │ Support/langchain/git_repos/ai_forever_gigachain_git_b7cf9490/templates/summariz… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'Invalid LangServe PyProject.toml'

Запрос на доработку:

No response

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

1 participant