Danswer部署指南

发布时间:2024年01月12日

Quickstart

How to deploy Danswer on your local machine

?

Requirements

  • git
  • docker with compose (docker version >= 1.13.0)

?

Setup

This quickstart guide covers setting up Danswer for local execution

  1. Clone the?Danswer?repo:

git clone https://github.com/danswer-ai/danswer.git
  1. Navigate to?danswer/deployment/docker_compose

cd danswer/deployment/docker_compose
  1. Bring up your docker engine and run:
    • To pull images from DockerHub and run Danswer:

    docker compose -f docker-compose.dev.yml -p danswer-stack up -d --pull always --force-recreate
    
    • Alternatively, to build the containers from source and start Danswer, run:

    docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build --force-recreate
    
    • These commands are also used to redeploy if any?.env?variables are updated
    • This may take 15+ minutes depending on your internet speed.
  2. Danswer will now be running on?http://localhost:3000.

?

OpenAI API Key

Note:?On the initial visit, Danswer will prompt for an OpenAI API key. Without this Danswer will be able to provide search functionalities but not direct Question Answering.

You can get an OpenAI API key at:?https://platform.openai.com/account/api-keys

?

Indexing Documents

This quickstart guide will index a publicly accessible website as this requires no additional authorization setup

  1. Navigate to the top right of Danswer’s home screen and select?Admin Panel

Connectors

  1. In the Web Connector dashboard, pick any base URL to index.
    • This will index all pages under that base URL that is reachable from hyperlinks.
    • You can check the indexing status page to monitor the progress.

WebConnector

  1. After the pages are indexed, you can now navigate back to the homepage and start asking questions and getting answers! 🥳

SampleQA

?

Shutting Down

docker compose -f docker-compose.dev.yml -p danswer-stack down

add?-v?at the end to delete the volumes (containing users and indexed documents)

参考文档:Quickstart - Danswer Documentation

文章来源:https://blog.csdn.net/wangwenzhe222/article/details/135561662
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。