Commit Graph

64 Commits

Author SHA1 Message Date
Neha Prasad
340709504c feat: add base64 document attachment support to API chat endpoints (#4672)
* feat: add base64 document attachment support to API chat endpoints

* remove parsed documents from api chat process
linting for simplicity
fix logic issues with flow of data through the pipeline
documentiation

* change var scope

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-24 15:48:44 -08:00
Timothy Carambat
e81bd471dd patch folder name GET request response (#4395)
* patch folder name GET request response

* fix response cb
2025-09-17 13:05:11 -07:00
Jonas Stawski
b8d4cc3454 Added metadata parameter to document/upload, document/upload/{folderName}, and document/upload-link (#4342)
* Added the ability to pass in metadata to the /document/upload/{folderName} endpoint

* Added the ability to pass in metadata to the /document/upload-link endpoint

* feat: added metadata to document/upload api endpoint

* simplify optional metadata in document dev api endpoints

* lint

* patch handling of metadata in dev api

* Linting, small comments

---------

Co-authored-by: jstawskigmi <jstawski@getmyinterns.org>
Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-17 11:17:29 -07:00
timothycarambat
6358d087c2 Fix /openai/models compat endpoint to return correct response schema
resolves #4295
2025-08-15 14:46:51 -07:00
Sean Hatfield
610bdd4673 Allow custom headers in upload-link endpoint (#3695)
* allow custom headers in upload-link endpoint

* override loader.scrape to allow for passing of headers in langchain puppeteer

* lint

* Rename some variables
move positional args to named args
update documentation to reflect arg changes and funciton sigs
validate header object before attempting to end to forward to request

* update header validation for custom headers

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-04-22 12:47:12 -07:00
Timothy Carambat
05ced11650 Add support for /v1/document/upload* endpoints to support auto-add to workspace (#3692) 2025-04-21 08:28:33 -07:00
Sean Hatfield
19ba6bcc15 Enable slash commands in dev API chat/stream-chat (#3514)
* enable slash commands in dev api

* lint

* Remove ability to use default slash commands in API request
Add `reset` param to body that can reset chats according to the api chat execution parameters
Allow null `message` if `reset` is set in request.
Added early return for if message is null and reset is true
Enable chat to reset chat history and continue `message` execution
Added generic WorkspaceChat history reset function. Deprecated others

* update grep function comment
remove debug

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-03-24 11:29:36 -07:00
Sean Hatfield
e01c0dff04 Fix embedding endpoint for OpenAI compatible API (#3467)
* fix embedding endpoint for openai compatible api

* remove unused imports

* add backwards compat for embedding

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-03-17 18:10:24 -07:00
Sean Hatfield
5658aac25c Add remove folder developer API endpoint (#3489)
* add remove folder api endpoint

* update purgeFolder function comment

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-03-17 17:05:21 -07:00
timothycarambat
fa454aa6ca patch openapi swagger docs 2025-02-26 12:30:26 -08:00
Shanmukeshwar
d005107e24 feat: Add endpoint to upload documents to a specified folder (#3276)
* feat: Add endpoint to retrieve documents by folder name

* isWithin Check on path to prevent path traversal

* feat: Add endpoint to upload documents to a specified folder

* refactor upload to folder endpoint + update jsdoc for swagger

* linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-02-26 12:26:24 -08:00
Sean Hatfield
c36df2c364 Fix garbled non English chars on document upload (#3301)
update handleAPIFileUpload middleware to handle non english chars + update jsdoc
2025-02-20 23:09:34 -08:00
timothycarambat
defeb96c38 patch swagger 2025-02-18 16:02:55 -08:00
Shanmukeshwar
eeaa6b0151 feat: Add endpoint to retrieve documents by folder name (#3258)
* feat: Add endpoint to retrieve documents by folder name

* isWithin Check on path to prevent path traversal

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-02-18 14:01:19 -08:00
Sean Hatfield
354b66e09e Add additional embed API endpoints (#3264)
* wip embed dev api endpoints

* fix /v1/embed/new endpoint

* add delete endpoint to embeds

* linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-02-18 13:56:56 -08:00
timothycarambat
d52249aff8 support attachments via thread API chat/stream-chat endpoints 2024-12-31 09:52:21 -08:00
Sean Hatfield
f8885a43e4 Append writable fields to dev API new workspace endpoint (#2843)
* add writible fields to dev api new workspace endpoint

* lint

* implement validations for workspace model

* update swagger comments

* simplify validations for workspace on frontend and API

* cleanup validations

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2024-12-16 15:12:20 -08:00
Timothy Carambat
ff024286d0 Add new workspace user management endpoint (#2842)
deprecate old endpoint which users workspace ID vs slug
resolves #2838
2024-12-16 11:50:34 -08:00
Timothy Carambat
538078747d Add vector search API endpoint (#2815)
* Add vector search API endpoint

* Add missing import

* Modify the data that is returned

* Change similarityThreshold to scoreThreshold

As this is what is actually returned by the search

* Removing logging (oops!)

* chore: regen swagger docs for new endpoint
fix: update function to sanity check values to prevent crashes during search

---------

Co-authored-by: Scott Bowler <scott@dcsdigital.co.uk>
2024-12-12 10:12:32 -08:00
timothycarambat
a0c5d898f0 patch docs with proper input for OpenAI compatible embeddings
resolves #2801
2024-12-11 08:15:52 -08:00
Sean Hatfield
e719d05027 Add optional limit and orderBy to dev api chat endpoint (#2559)
add optional limit and orderBy to dev api chat endpoint
2024-10-30 14:47:24 -07:00
Mr Simon C
ccde891aa2 Feature/update api example outputs (#2547)
* /v1/workspace/{slug} actually returns an array - update example output

* update swagger example to show array output
2024-10-29 16:50:19 -07:00
Timothy Carambat
2c9cb28d5f Simple SSO feature for login flows from external services (#2553)
* Simple SSO feature for login flows from external services

* linting
2024-10-29 15:30:53 -07:00
Timothy Carambat
72ba9f7f28 Add filtering to sessionID for workspace chats (#2531) 2024-10-24 15:10:50 -07:00
Timothy Carambat
e71392d83f Feature/thread creation slug name (#2512)
* thread creation additional params name and slug, with api

* typo fix

* Rebuild openai Swagger docs
Handle validations for fields to prevent invalid field inputs for .new
Enforce sluggification of `slug` to prevent breaking of URL structs

---------

Co-authored-by: abrakadobr <abrakadobr@gmail.com>
2024-10-21 13:09:55 -07:00
Sean Hatfield
be6289d141 Daily message limit per user (#2417)
* set message limit per user

* remove old limit user messages + unused admin page

* fix daily message validation

* refactor message limit input
refactor canSendChat on user to a method on user model

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2024-10-15 14:01:29 -07:00
Sean Hatfield
e6c4eb3f1c Support attachments in developer API (#2373)
* support attachments in developer api

* lint

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2024-09-25 13:44:26 -07:00
Mr Simon C
7594841dac Bug/make swagger json output openapi 3 compliant (#2219)
update source to ensure swagger.json is openapi 3.0.0 compliant
2024-09-04 15:40:24 -07:00
Timothy Carambat
fdc3add53c Api session id support (#2158)
* Refactor api endpoint chat handler to its own function
remove legacy `chatWithWorkspace` and cleanup `index.js`

* Add `sessionId` in dev API to partition chats logically statelessly
2024-08-21 15:25:47 -07:00
timothycarambat
17abbe97e5 remove #swagger.path from API docs 2024-08-20 12:48:08 -07:00
timothycarambat
c9e19264eb fix validation issue 2024-08-07 14:24:24 -07:00
Sean Hatfield
665553af5a Developer API access for embed chat widgets (#1999)
* developer api access for embedded chat widgets and embed chats

* lint

* uncheck files

* sanitize embed api inputs

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2024-08-07 11:36:32 -07:00
Timothy Carambat
ae58a2cb0d Return threads for API workspace calls (#1978)
* Return threads for API workspace calls

* remove import
2024-07-26 14:18:40 -07:00
timothycarambat
d0713e15f1 patch response body for swagger 2024-07-22 15:21:32 -07:00
timothycarambat
7b42a67acf docs: update requirement for /raw-text endpoint
resolves #1893
2024-07-22 13:19:57 -07:00
Timothy Carambat
3198718975 Update references to new domain (#1916) 2024-07-22 11:05:34 -07:00
timothycarambat
f9929a28cb patch lint 2024-07-19 15:27:56 -07:00
Sean Hatfield
77916d920b [FEAT] Remove users_can_delete_workspaces feature (#1742)
remove all references to users_can_delete_workspaces option
2024-06-25 16:46:06 -07:00
Timothy Carambat
88a0335fd2 Add OpenAI compatible API support (#1757) 2024-06-24 18:28:21 -07:00
Sean Hatfield
12bf576e16 [FEAT] Workspace threads developer API endpoints (#1668)
* WIP workspace threads developer api endpoints

* fix swagger docs

* fix broken endpoints and test on single/multi user modes

* support for chatting with workspace thread by userId

* update swagger json
2024-06-20 16:27:35 -07:00
timothycarambat
421c5c6b91 linting 2024-06-18 11:30:50 -07:00
lewismacnow
6c68bdbd51 1711 enhance workspace users api (#1712)
* Update workspace.js

adds userId to the workspaceUsers function

* Update openapi.json

Updates the workspace/users API docs to display correct 200 response example, including userId, username, role and last update datetime.
2024-06-18 09:35:40 -07:00
Sean Hatfield
1c473621aa [FEAT] Add user management endpoints to list all users via developer API (#1708)
* add user management endpoints to list all users via developer api

* rename users to user management in swagger docs

* linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2024-06-17 16:24:41 -07:00
timothycarambat
0d5cc558c9 linting
patch UI exception with invalid return value from failed parse
resolves #1692
2024-06-17 13:55:10 -07:00
lewismacnow
38441f4b21 1693 get workspace users api (#1694)
* Enhance API - add GET for users with access to workspace

Adds GET request endpoint for retrieving a list of users with permissions to access the specified workspace

* Update Swagger for users with access to workspace

Adds swagger docs for the endpoint used to retrieve users with access to workspace. "v1/admin/workspaces/:workspaceId/users"
2024-06-17 13:52:01 -07:00
timothycarambat
3434bf4686 linting 2024-06-07 10:09:35 -07:00
yonathan suarez
bb0a4b0531 Add API Endpoint for Deleting Documents in system (#1623)
* fix: "remove document system api"

* fix: "update text system system "

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2024-06-07 09:22:03 -07:00
Timothy Carambat
196c4c13c4 Fix Swagger docs (#1479) 2024-05-21 21:30:37 -05:00
Sean Hatfield
5bf4b4db58 [FEAT] Add support for Voyage AI embedder (#1401)
* add support for voyageai embedder

* remove unneeded import

* linting

* Add ENV examples
Update how chunks are processed for Voyage
use correct langchain import
Add data handling

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2024-05-19 13:20:23 -05:00
yonathan suarez
ecd5d3cb8a Add API endpoint for updating pin status (#1449) 2024-05-19 12:47:47 -05:00