Hi @Mindaugas !!! Welcome to our community!
Nice catch!
I figured that that service will require the Content Type.
so this will work:
curl localhost:9090/vectorize -d '{"texts": ["hello"], "images":[]}' --header 'Content-Type: application/json'
Note: this is considering the model is exposed in 9090, by adding the port mapping:
multi2vec-clip: # Set the name of the inference container
ports:
- 9090:8080
image: cr.weaviate.io/semitechnologies/multi2vec-clip:sentence-transformers-clip-ViT-B-32-multilingual-v1
environment:
ENABLE_CUDA: 0 # set to 1 to enable
I had changed the docs:
weaviate:main ← weaviate:add-content-type-header-to-multi2vec-clip-curl-example
opened 06:53PM - 14 Jun 24 UTC
<!--
Thank you for contributing to this project! You must fill out the informat… ion below before we can review this pull request. We can triage your pull request to the best possible team for review if you explain why you're making a change (or linking to a pull request) and what changes you've made.
See our [CONTRIBUTING.md](/CONTRIBUTING.md) for information how to contribute.
Thanks again!
-->
### What's being changed:
fixing curl example, from discussion:
https://forum.weaviate.io/t/curl-localhost-8080-vectorize-doesnt-work/2707
### Type of change:
- [x] **Documentation** updates (non-breaking change to fix/update documentation)
- [ ] **Website** updates (non-breaking change to update main page, company pages, pricing, etc)
- [ ] **Content** updates – **blog**, **podcast** (non-breaking change to add/update content)
- [ ] **Bug fix** (non-breaking change to fixes an issue with the site)
- [ ] **Feature** or **enhancements** (non-breaking change to add functionality)
### How Has This Been Tested?
- [ ] **Github action** – automated build completed without errors
- [ ] **Local build** - the site works as expected when running `yarn start`
> note, you can run `yarn verify-links` to test site links locally
Also, a nice place to check for our inference models tests is here:
import unittest
import requests
import time
class SmokeTest(unittest.TestCase):
def setUp(self):
self.url = 'http://localhost:8000'
for i in range(0, 100):
try:
res = requests.get(self.url + '/.well-known/ready')
if res.status_code == 204:
return
else:
raise Exception(
"status code is {}".format(res.status_code))
except Exception as e:
print("Attempt {}: {}".format(i, e))
time.sleep(1)
This file has been truncated. show original
Let me know if this helps
1 Like