Package org.vrspace.server.connect
Class SketchfabConnector
java.lang.Object
org.vrspace.server.connect.SketchfabConnector
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsearchModels(ModelSearchRequest params, Consumer<GltfModel> postProcess) Issue sketchfab API search request, then process and return results.updateCategory(String catName)
-
Field Details
-
loginUrl
- See Also:
-
searchUrl
- See Also:
-
-
Constructor Details
-
SketchfabConnector
public SketchfabConnector()
-
-
Method Details
-
searchModels
public ModelSearchResponse searchModels(ModelSearchRequest params, Consumer<GltfModel> postProcess) throws IOException, InterruptedException Issue sketchfab API search request, then process and return results. Creates new GltfModel if it does not exist, and stores it to the local database. If it does exist, returns that description instead of sketchfab description. Because sketchfab descriptions rarely describe the model, and Ollama generated the model description from the screenshot. Before returning, passes the GltfModel to postProcess function.- Parameters:
params- Search request with keywords and other search parameters.postProcess- Optional function performing image post-processing, i.e. generates model description with Ollama.- Returns:
- sketchfab search results enriched
- Throws:
IOException- on network errorInterruptedException- on shutdown
-
updateCategory
-