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

Resolve : https://github.com/cheshire-cat-ai/core/issues/723 #751

Closed
wants to merge 2 commits into from

Conversation

piperino11
Copy link

Description

Resolution of the problem:
"""
I created a flask server to use SentenceTransformer("multi-qa-MiniLM-L6-cos-v1")

with EmbedderOpenAICompatibleConfig

I can't handle requests with error "POST /v1/embeddings HTTP/1.1" 415 -

In particular on the cat side I have the error
File "/app/cat/factory/custom_embedder.py", line 59, in embed_documents
ret.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '415 UNSUPPORTED MEDIA TYPE' for url 'http://server:port/v1/embeddings'
"""
Related to issue #723

Type of change

  • [ X] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • [x ] My code follows the style guidelines of this project
  • [x ] I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@pieroit
Copy link
Member

pieroit commented Mar 25, 2024

Hi @piperino11 thanks, a couple of things:

  • did you test this with another OpenAI compatible embedding server? It may be a problem related to your flask not accepting json
  • in case your edit is necessary, can you redo the PR branching off and towards the develop branch? main is just for releases

Closing this, let me know!

@pieroit pieroit closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants