Giter VIP home page Giter VIP logo

skywalkerdarren / chatweb Goto Github PK

View Code? Open in Web Editor NEW
856.0 20.0 134.0 99 KB

ChatWeb can crawl web pages, read PDF, DOCX, TXT, and extract the main content, then answer your questions based on the content, or summarize the key points.

Python 89.19% Jupyter Notebook 9.74% Dockerfile 0.98% Shell 0.10%
chatgpt embedding gpt-35-turbo news-extractor newspaper openai pgvector postgresql vector-database faiss

chatweb's Introduction

Hi there 👋

My Skills

SkywalkerDarren

Metrics

  • 🚀 I‘m FULL STACK programmer
  • 🔭 I’m currently working on Android and Flutter and Backend
  • 🌱 I’m currently learning Flutter and GO

chatweb's People

Contributors

folook avatar skywalkerdarren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatweb's Issues

I installed it with docker, but it ran wrong.

This is the wrong details:

INFO:     :35837 - "POST /crawler_url HTTP/1.1" 500 Internal Server Error
chatweb-chatweb-1  | ERROR:    Exception in ASGI application
chatweb-chatweb-1  | Traceback (most recent call last):
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
chatweb-chatweb-1  |     result = await app(  # type: ignore[func-returns-value]
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
chatweb-chatweb-1  |     return await self.app(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 276, in __call__
chatweb-chatweb-1  |     await super().__call__(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 122, in __call__
chatweb-chatweb-1  |     await self.middleware_stack(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
chatweb-chatweb-1  |     raise exc
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
chatweb-chatweb-1  |     await self.app(scope, receive, _send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
chatweb-chatweb-1  |     raise exc
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
chatweb-chatweb-1  |     await self.app(scope, receive, sender)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
chatweb-chatweb-1  |     raise e
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
chatweb-chatweb-1  |     await self.app(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 718, in __call__
chatweb-chatweb-1  |     await route.handle(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
chatweb-chatweb-1  |     await self.app(scope, receive, send)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
chatweb-chatweb-1  |     response = await func(request)
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
chatweb-chatweb-1  |     raw_response = await run_endpoint_function(
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
chatweb-chatweb-1  |     return await dependant.call(**values)
chatweb-chatweb-1  |   File "/app/api.py", line 34, in crawler_url
chatweb-chatweb-1  |     contents, lang = web_crawler_newspaper(req.url)
chatweb-chatweb-1  |   File "/app/contents.py", line 14, in web_crawler_newspaper
chatweb-chatweb-1  |     raw_html, lang = _get_raw_html(url)
chatweb-chatweb-1  |   File "/app/contents.py", line 35, in _get_raw_html
chatweb-chatweb-1  |     with webdriver.Chrome(options=chrome_options) as driver:
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 84, in __init__
chatweb-chatweb-1  |     super().__init__(
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 101, in __init__
chatweb-chatweb-1  |     self.service.start()
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 100, in start
chatweb-chatweb-1  |     self.assert_process_still_running()
chatweb-chatweb-1  |   File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 113, in assert_process_still_running
chatweb-chatweb-1  |     raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
chatweb-chatweb-1  | selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/114.0.5735.90/chromedriver unexpectedly exited. Status code was: 127

AttributeError: 'generator' object has no attribute 'choices' in ai.py

Not familar with your codes, report error as below:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\gradio\routes.py", line 414, in run_predict
output = await app.get_blocks().process_api(
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\gradio\blocks.py", line 1323, in process_api
result = await self.call_function(
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\gradio\blocks.py", line 1051, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\ProgramData\Anaconda3\envs\py39\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\coding\notNowUsing\nlp2000\News_nltk\Example_test\OpenaiFinancialReports\chatWeb\webui.py", line 130, in respond
kw = self.ai.get_keywords(message)
File "D:\coding\notNowUsing\nlp2000\News_nltk\Example_test\OpenaiFinancialReports\chatWeb\ai.py", line 86, in get_keywords
result = self._chat_stream([
File "D:\coding\notNowUsing\nlp2000\News_nltk\Example_test\OpenaiFinancialReports\chatWeb\ai.py", line 47, in _chat_stream
print(response.choices[0].message.content.strip())
AttributeError: 'generator' object has no attribute 'choices'

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.