Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat ui sends message prompt 404 #1458

Open
nextdoorUncleLiu opened this issue Sep 9, 2024 · 2 comments
Open

Chat ui sends message prompt 404 #1458

nextdoorUncleLiu opened this issue Sep 9, 2024 · 2 comments
Labels
support A request for help setting things up

Comments

@nextdoorUncleLiu
Copy link

MONGODB_URL='mongodb://localhost:27017'
PLAYWRIGHT_ADBLOCKER='false'
MODELS=`[
  {
    "name": "Local minicpm",
    "tokenizer": "minicpm",
    "preprompt": "",
    "chatPromptTemplate": "<s>{{preprompt}}{{#each messages}}{{#ifUser}}<|user|>\n{{content}}<|end|>\n<|assistant|>\n{{/ifUser}}{{#ifAssistant}}{{content}}<|end|>\n{{/ifAssistant}}{{/each}}",
    "parameters": {
      "stop": ["<|end|>", "<|endoftext|>", "<|assistant|>"],
      "temperature": 0.7,
      "max_new_tokens": 1024,
      "truncate": 3071
    },
    "endpoints": [{
      "type" : "openai",
      "baseURL": "***/v1/chat/completions",
      "defaultHeaders": {
        "x-portkey-config": '{ "Authorization": "Bearer apikey" }'
      }
    }],
  },
]`

Prompt for the following error:

ERROR (15839): 404 status code (no body)
    err: {
      "type": "NotFoundError",
      "message": "404 status code (no body)",
      "stack":
          Error: 404 status code (no body)
              at APIError.generate (file:///Users/user/Desktop/chat-ui/node_modules/openai/error.mjs:50:20)
              at OpenAI.makeStatusError (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:268:25)
              at OpenAI.makeRequest (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:311:30)
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
              at async eval (/Users/user/Desktop/chat-ui/src/lib/server/endpoints/openai/endpointOai.ts:111:36)
              at async Module.generateFromDefaultEndpoint (/Users/user/Desktop/chat-ui/src/lib/server/generateFromDefaultEndpoint.ts:11:23)
              at async generateTitle (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/title.ts:53:10)
              at async Module.generateTitleForConversation (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/title.ts:16:19)
      "status": 404,
      "headers": {
        "connection": "keep-alive",
        "content-encoding": "gzip",
        "content-type": "text/plain; charset=utf-8",
        "date": "Mon, 09 Sep 2024 13:29:16 GMT",
        "transfer-encoding": "chunked",
        "vary": "Accept-Encoding"
      }
    }
[21:29:16.156] ERROR (15839): 404 status code (no body)
    err: {
      "type": "NotFoundError",
      "message": "404 status code (no body)",
      "stack":
          Error: 404 status code (no body)
              at APIError.generate (file:///Users/user/Desktop/chat-ui/node_modules/openai/error.mjs:50:20)
              at OpenAI.makeStatusError (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:268:25)
              at OpenAI.makeRequest (file:///Users/user/Desktop/chat-ui/node_modules/openai/core.mjs:311:30)
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
              at async eval (/Users/user/Desktop/chat-ui/src/lib/server/endpoints/openai/endpointOai.ts:111:36)
              at async Module.generate (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/generate.ts:8:30)
              at async textGenerationWithoutTitle (/Users/user/Desktop/chat-ui/src/lib/server/textGeneration/index.ts:62:3)
      "status": 404,
      "headers": {
        "connection": "keep-alive",
        "content-encoding": "gzip",
        "content-type": "text/plain; charset=utf-8",
        "date": "Mon, 09 Sep 2024 13:29:16 GMT",
        "transfer-encoding": "chunked",
        "vary": "Accept-Encoding"
      }
    }

Accessing through Postman alone is normal

@nextdoorUncleLiu nextdoorUncleLiu added the huggingchat For issues related to HuggingChat specifically label Sep 9, 2024
@nsarrazin nsarrazin added support A request for help setting things up and removed huggingchat For issues related to HuggingChat specifically labels Sep 10, 2024
@pocman
Copy link
Contributor

pocman commented Sep 12, 2024

could be related to empty content support on openai api #1445 (comment)

@nextdoorUncleLiu
Copy link
Author

Can chat ui support custom models, such as accessing my own server to receive and send messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support A request for help setting things up
Projects
None yet
Development

No branches or pull requests

3 participants