n4ze3m / dialoqbase

Create chatbots with ease
https://dialoqbase.n4ze3m.com/
MIT License
1.54k stars 252 forks source link

rest api #166

Closed longneck84 closed 3 months ago

longneck84 commented 7 months ago

if i use api as data source, is it possible to re-fetch it every period of time?

n4ze3m commented 7 months ago

At the moment, it's not possible, but the addition of that feature is already planned. :)

longneck84 commented 6 months ago

one more question,

is it possible to change the base url for openai api?

n4ze3m commented 6 months ago

yes, use OPENAI_API_URL env for custom base url :)

longneck84 commented 6 months ago

thank you but i updated the .env and do docker compose again, it looks like it is still point to api.openai.com, and i got following error:

provider OpenAI modelName gpt-4-1106-preview using openai { streaming: true } provider OpenAI modelName gpt-4-1106-preview using openai {} AuthenticationError: 401 Incorrect API key provided: sk-v9KbSEf74. You can find your API key at https://platform.openai.com/account/api-keys. at APIError.generate (/app/node_modules/openai/error.js:46:20) at OpenAI.makeStatusError (/app/node_modules/openai/core.js:251:33) at OpenAI.makeRequest (/app/node_modules/openai/core.js:290:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/node_modules/langchain/dist/embeddings/openai.cjs:223:29 at async RetryOperation._fn (/app/node_modules/p-retry/index.js:50:12) { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '833ebc60be1c7a54-DUS', connection: 'keep-alive', 'content-length': '301', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 11 Dec 2023 15:24:40 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=mY7RSndnpm.4NmvEX1exZDA_PFm6LsE_NqejPYHkraw-1702308280-1-AZGRVnayO52fGtfZs6Hudk+nvHhnOiOzEIYNdC/cRKwjNB25xZt0SYgMsPF0y5u0UAZcgZZB2nAaRwseAo5dy4M=; path=/; expires=Mon, 11-Dec-23 15:54:40 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=ArPw8slYDKUMudz7gqg9b0XqAGuv1eRzH5is9d2hnv8-1702308280597-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=15724800; includeSubDomains', vary: 'Origin', 'x-request-id': 'e66d817060c9caf05cbab3b771fd9ab1' }, error: { message: 'Incorrect API key provided: sk-v9KbSEf74. You can find your API key at https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: 'invalid_api_key' }, code: 'invalid_api_key', param: null, type: 'invalid_request_error', attemptNumber: 1, retriesLeft: 6 }

n4ze3m commented 3 months ago

Hey, Dialoqbase API and SDK are now released.

Go to Settings > Profile > Create API Key, then use it as the Authorization key.

You can access Swagger docs by visiting {your_dialoqbase_url}/docs.

SDK Documentation (not fully completed): https://dialoqbase.n4ze3m.com/reference/getting-started.html

If you face any issue, please join Dialoqbase Discord server.