Skip to content

对第五章案例实践后问题的反馈 #6

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

Open
lvyue1314 opened this issue Apr 6, 2025 · 0 comments
Open

对第五章案例实践后问题的反馈 #6

lvyue1314 opened this issue Apr 6, 2025 · 0 comments

Comments

@lvyue1314
Copy link

有些Q|A我已经解决,就放入我的csdn博客中【动手学CAMEL Multi-Agent】第五章——综合实践,有需要的请自行参考。

目前我遇到的没解决的问题有:

  1. 执行后端设置的安装依赖时,camel-0.2.11 不存在于公共 PyPI 源,最高版本为 0.1.2。
(NavigatorAI) E:\github\NavigatorAI\handy-multi-agent\code\第五章\examples\NavigatorAI\backend>pip install -r requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement camel==0.2.11 (from versions: 0.1, 0.1.1, 0.1.2)
ERROR: No matching distribution found for camel==0.2.11

然后我试了试"pip install camel"

Successfully installed camel-0.1.2

2.Flask开发服务器在本地的访问出现如下页面:

Image
经过查询和curl检验

curl http://127.0.0.1:6000

出现如下结果:

<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

3.在前端设置的安装依赖中出现了严重漏洞提醒:

(NavigatorAI) E:\github\NavigatorAI\handy-multi-agent\code\第五章\examples\NavigatorAI\frontend>npm audit fix

up to date, audited 269 packages in 7s

42 packages are looking for funding
  run `npm fund` for details

# npm audit report

next  14.0.0 - 14.2.24
Severity: critical
Next.js Allows a Denial of Service (DoS) with Server Actions - https://github.com/advisories/GHSA-7m27-7ghc-44w9
Authorization Bypass in Next.js Middleware - https://github.com/advisories/GHSA-f82v-jwr5-mffw
fix available via `npm audit fix --force`
Will install [email protected], which is outside the stated dependency range
node_modules/next

1 critical severity vulnerability

To address all issues, run:
  npm audit fix --force

若是执行强制修复,可能会超出package.json 中指定的版本范围,请开发者判断下
image

4.前端启动,需要开发者将该案例所指的原项目中的lib文件夹以及其中的文件拷贝过来,因为我在启动中,出现了如下提示:

 ○ Compiling / ...
 ⨯ ./components/profile-modal.tsx:13:1
Module not found: Can't resolve '@/lib/utils'
  11 | import { CalendarIcon } from "lucide-react"
  12 | import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
> 13 | import { cn } from "@/lib/utils"
     | ^
  14 |
  15 | interface ProfileModalProps {
  16 |   open: boolean

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./components/sidebar.tsx
./app/page.tsx
 ⨯ ./components/profile-modal.tsx:13:1
Module not found: Can't resolve '@/lib/utils'
  11 | import { CalendarIcon } from "lucide-react"
  12 | import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
> 13 | import { cn } from "@/lib/utils"
     | ^
  14 |
  15 | interface ProfileModalProps {
  16 |   open: boolean

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./components/sidebar.tsx
./app/page.tsx
 ⨯ ./components/profile-modal.tsx:13:1
Module not found: Can't resolve '@/lib/utils'
  11 | import { CalendarIcon } from "lucide-react"
  12 | import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
> 13 | import { cn } from "@/lib/utils"
     | ^
  14 |
  15 | interface ProfileModalProps {
  16 |   open: boolean

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./components/sidebar.tsx
./app/page.tsx
 GET / 500 in 40043ms

lib文件夹复制之后,再运行,结果如下:

Image

5.上述前端界面经过测试,发现上传pdf出错:

Image
对话出错:

Image
我怀疑是我的api等配置有问题,但不清楚具体是哪个出了问题,以下是我的后端.env:

OPENAI_BASE_URL = "https://api.openai.com/v1"
OPENAI_API_KEY ="sk-proj-FltHqtlzwRqlt2lfrCBlDmKTv94tBTsWKhyfrFMYuRzky_(省略一部分)"
QWEN_API_KEY = "283424cb-(省略一部分)"
GOOGLE_API_KEY = 
SEARCH_ENGINE_ID = 
FIRECRAWL_API_KEY = 

# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=1
PORT=6000
HOST=0.0.0.0

# API Keys
MODEL_TYPE=gpt-3.5-turbo

# Upload Configuration
UPLOAD_FOLDER=../frontend/public
MAX_CONTENT_LENGTH=16777216  # 16MB in bytes
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