Support non-file sources #4

Open
opened 2025-10-17 03:44:33 +00:00 by khird · 0 comments
Member

The SDK at present requires the unstructured input, ontology, and ontology spec to be referenced by filepath. In CleverBrag's use case, the input has been preprocessed and exists only as a sequence of chunks of text in the database by the time we are ready for extraction, and the ontology and its spec likewise are stored as part of the user's profile in the database. This SDK would ideally provide a method that allows the calling code to create a job with plain strs instead of filepaths to support such a use case.

Definition of done

  • the SDK allows calling code to create a text2KG job with the unstructured input, ontology, and ontology spec all provided as str or other mechanism that does not assume they come from the filesystem (a file-like object such as StringIO would be acceptable)
The SDK at present requires the [unstructured input](https://git.cleverthis.com/cleverlibre/cleverswarm-python-client/src/commit/cd808dc3dd2beb77b661fc0dda65fd2082596b66/src/cleverswarm_python_client/libs/cleverswarm_client.py#L615), [ontology](https://git.cleverthis.com/cleverlibre/cleverswarm-python-client/src/commit/cd808dc3dd2beb77b661fc0dda65fd2082596b66/src/cleverswarm_python_client/libs/cleverswarm_client.py#L621), and [ontology spec](https://git.cleverthis.com/cleverlibre/cleverswarm-python-client/src/commit/cd808dc3dd2beb77b661fc0dda65fd2082596b66/src/cleverswarm_python_client/libs/cleverswarm_client.py#L626) to be referenced by filepath. In CleverBrag's use case, the input has been preprocessed and exists only as a sequence of chunks of text in the database by the time we are ready for extraction, and the ontology and its spec likewise are stored as part of the user's profile in the database. This SDK would ideally provide a method that allows the calling code to create a job with plain `str`s instead of filepaths to support such a use case. Definition of done - the SDK allows calling code to create a text2KG job with the unstructured input, ontology, and ontology spec all provided as `str` or other mechanism that does not assume they come from the filesystem (a file-like object such as StringIO would be acceptable)
CoreRasurae added this to the v0.1 milestone 2025-10-27 16:05:30 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: cleverlibre/cleverswarm-python-client#4
No description provided.