Comments (7)
Hi, @gary163, you can refer here
from db-gpt.
I've looked into it, but regarding the command line method, how do I make requests to OpenAI through configuration?
from db-gpt.
Unable to configure in the configuration file, can you provide a demo? @fangyinc
from db-gpt.
Unable to configure in the configuration file, can you provide a demo? @fangyinc
- Enable network forward for
api.openai.com
dbgpt net forward --local-port 5010 \
--remote-host api.openai.com \
--remote-port 443 \
--ssl \
--proxies https://username:[email protected]:443 \
--timeout 30
- Modify your
.env
PROXY_SERVER_URL=https://127.0.0.1:5010/v1/chat/completions
PROXY_API_KEY={your api key}
- Restart your DB-GPT.
from db-gpt.
Still encountering errors, please see the following error message:
`2024-04-18 10:14:33 -Pro.local dbgpt.storage.vector_store.chroma_store[48818] INFO Check persist_dir: /DB-GPT/pilot/data/SR_FIN_ADS_profile.vectordb
2024-04-18 10:14:33 -Pro.local dbgpt.rag.summary.db_summary_client[48818] INFO Vector store name SR_FIN_ADS_profile exist
2024-04-18 10:14:33 -Pro.local dbgpt.rag.summary.db_summary_client[48818] INFO initialize db summary profile success...
2024-04-18 10:14:33 -Pro.local dbgpt.rag.summary.db_summary_client[48818] INFO db summary embedding success
2024-04-18 10:14:34 -Pro.local dbgpt.model.cluster.worker.default_worker[48818] ERROR Model inference error, detail: Traceback (most recent call last):
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1457, in _request
response = await self._client.send(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
raise exc from None
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request
raise exc
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_async/connection.py", line 154, in _connect
stream = await stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 78, in start_tls
raise exc
File "/DB-GPT/venv/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 69, in start_tls
ssl_stream = await anyio.streams.tls.TLSStream.wrap(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/anyio/streams/tls.py", line 132, in wrap
await wrapper._call_sslobject_method(ssl_object.do_handshake)
File "/DB-GPT/venv/lib/python3.11/site-packages/anyio/streams/tls.py", line 140, in _call_sslobject_method
result = func(*args)
^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 979, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/DB-GPT/dbgpt/model/cluster/worker/default_worker.py", line 246, in async_generate_stream
async for output in generate_stream_func(
File "/DB-GPT/dbgpt/model/proxy/llms/chatgpt.py", line 43, in chatgpt_generate_stream
async for r in client.generate_stream(request):
File "/DB-GPT/dbgpt/model/proxy/llms/chatgpt.py", line 230, in generate_stream
async for r in self.generate_stream_v1(messages, payload):
File "/DB-GPT/dbgpt/model/proxy/llms/chatgpt.py", line 258, in generate_stream_v1
chat_completion = await self.client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 1330, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1725, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1428, in request
return await self._request(
^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1481, in _request
return await self._retry_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1550, in _retry_request
return await self._request(
^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1481, in _request
return await self._retry_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1550, in _retry_request
return await self._request(
^^^^^^^^^^^^^^^^^^^^
File "/DB-GPT/venv/lib/python3.11/site-packages/openai/_base_client.py", line 1491, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.`
The proxy server reported the following error:
Among them, https://xx:[email protected]:443 has been anonymized by me.
(venv) $ dbgpt net forward --local-port 5010 \
--remote-host api.openai.com
--remote-port 443
--ssl
--proxies https://xx:[email protected]:443
--timeout 30
INFO: Started server process [48248]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:5010 (Press CTRL+C to quit)
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
from db-gpt.
This issue has been marked as stale
, because it has been over 30 days without any activity.
from db-gpt.
This issue bas been closed, because it has been marked as stale
and there has been no activity for over 7 days.
from db-gpt.
Related Issues (20)
- [Bug]Model management HOT 1
- [Bug]v0.5.6 cannot connect milvus HOT 3
- [Feature][data_privacy/] most important " mask &sensitive_detection" will empty forever?
- [Bug] [Module Name] Bug title web can't show js file HOT 1
- ERROR! Expecting value: line 1 column 1 (char 0) dashboard sql error HOT 1
- ApacheDoris Test connect Failure!(pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') (Background on this error at: https://sqlalche.me/e/20/e3q8) HOT 2
- [Bug] [Module Name] Bug title
- [Bug] [Chat Knowledge] dbms.graph.listGraphs() Procedure not found
- [Bug][Model] Load chatglm2-6b error HOT 2
- [Bug]Docker and docker compose deployment error reports, text2vec-large-chinese cannot find config.json
- [Bug] [ChatData] In version 5.6 deployed by docker compose, when using chatdata, the Chinese annotation information of table_info is not read out and spliced into prompt.
- [Bug] [Module Name] Bug title
- [Feature][RAG] add BM25 Retriever for ChatKnowledge
- [Feature][Module Name] /v1/dbgpts/chat/cancel Interface not implemented
- [Bug]Delete KG error HOT 3
- [Bug][ChatExcel] bug , Error parsing csv, incorrect header, and unable to draw ,chat excel csv error,cannot generate chart
- [Feature][Module Name] Alternative LLM models
- [Bug][dashboard] can't return result !! dashboard can not return result.
- [Bug]when I use chat data , sqlite sql can't execute correctly . chat data sql editor cannot execute
- Can you consider supporting the domestic database Dameng? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db-gpt.