fix: tags example was wrong

This commit is contained in:
Florian Hönicke
2023-04-07 01:39:04 +02:00
parent b2948624d7
commit ec14e20d5e
2 changed files with 5 additions and 1 deletions

View File

@@ -16,7 +16,8 @@ class MyInfoExecutor(Executor):
def foo(self, docs: DocumentArray, **kwargs) => DocumentArray:
for d in docs:
d.load_uri_to_blob()
d.tags['my_info'] = {'byte_length': len(d.blob)} # tags can only be a flat dictionary where keys are strings and values are strings, ints, floats, or bools
d.tags['byte_length'] = len(d.blob) # tags must be a flat dictionary where keys are strings and values are strings, ints, floats, or bools
d.tags['radius'] = 'large'
d.blob = None
return docs
```