AppFlowy-IO / AppFlowy-Cloud

AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
GNU Affero General Public License v3.0
534 stars 146 forks source link

[Bug] AI Server DNS can't be resolved #676

Open suntorytimed opened 5 days ago

suntorytimed commented 5 days ago

Describe the bug After 0.6.2 of AppFlowy resolved the issue of stuck AI requests I am now at the stage I can test the AI server of AppFlowy Cloud. When doing an AI request in AppFlowy I receive following error:

{"code":1017,"message":"Invalid request:reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"ai\")), port: Some(5001), path: \"/completion/stream\", query: None, fragment: None }, source: Error { kind: Connect, source: Some(ConnectError(\"dns error\", Custom { kind: Uncategorized, error: \"failed to lookup address information: Name or service not known\" })) } }"} 

To Reproduce Steps to reproduce the behavior:

  1. Deploy AppFlowy-Cloud with the default docker-compose.yml and deploy.env but adding your own passwords
  2. Keep APPFLOWY_AI_SERVER_HOST=ai and APPFLOWY_AI_SERVER_PORT=5001
  3. Do an AI request with a logged in user in AppFlowy 0.6.2
  4. See error

Expected behavior The request is successfully handled by OpenAI

Screenshots image

Desktop (please complete the following information):

Additional context

khorshuheng commented 3 days ago

Just to check: is the AI service running? In addition, is APPFLOWY_AI_OPENAI_API_KEY set?