这是indexloc提供的服务,不要输入任何密码
Skip to content

[FEAT]: API endpoint /workspace/new append writable fields on creation #2840

@PulzWave

Description

@PulzWave

How are you running AnythingLLM?

Docker (local)

What happened?

When you create a new workspace via the API, it ignores additional settings, such as "openAiPrompt", and "similarityThreshold".

The /workspace/update endpoint works correctly.

I'm using the "mintplexlabs/anythingllm:latest" Docker image.

Are there known steps to reproduce?

Curl example:

curl -X 'POST' \
  'http://localhost:3001/api/v1/workspace/new' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer xxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Bleh",
  "slug": "bleh",
  "similarityThreshold": 0.75,
  "queryRefusalResponse": "null",
   "openAiPrompt": "Only say'\''bleh'\'' in responses"
}'

Response:

{
  "workspace": {
    "id": 22,
    "name": "Bleh",
    "slug": "bleh",
    "vectorTag": null,
    "createdAt": "2024-12-16T08:54:59.666Z",
    "openAiTemp": null,
    "openAiHistory": 20,
    "lastUpdatedAt": "2024-12-16T08:54:59.666Z",
    "openAiPrompt": null,
    "similarityThreshold": 0.25,
    "chatProvider": null,
    "chatModel": null,
    "topN": 4,
    "chatMode": "chat",
    "pfpFilename": null,
    "agentProvider": null,
    "agentModel": null,
    "queryRefusalResponse": null
  },
  "message": null
}

When checking settings in front-end, they are still the default.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions