forked from Mirror/ollama4j
		
	Fixes #79
This commit is contained in:
		@@ -193,7 +193,7 @@ public class OllamaAPI {
 | 
				
			|||||||
            Elements modelSections = doc.selectXpath("//*[@id='repo']/ul/li/a");
 | 
					            Elements modelSections = doc.selectXpath("//*[@id='repo']/ul/li/a");
 | 
				
			||||||
            for (Element e : modelSections) {
 | 
					            for (Element e : modelSections) {
 | 
				
			||||||
                LibraryModel model = new LibraryModel();
 | 
					                LibraryModel model = new LibraryModel();
 | 
				
			||||||
                Elements names = e.select("div > h2 > span");
 | 
					                Elements names = e.select("div > h2 > div > span");
 | 
				
			||||||
                Elements desc = e.select("div > p");
 | 
					                Elements desc = e.select("div > p");
 | 
				
			||||||
                Elements pullCounts = e.select("div:nth-of-type(2) > p > span:first-of-type > span:first-of-type");
 | 
					                Elements pullCounts = e.select("div:nth-of-type(2) > p > span:first-of-type > span:first-of-type");
 | 
				
			||||||
                Elements popularTags = e.select("div > div > span");
 | 
					                Elements popularTags = e.select("div > div > span");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,6 +80,18 @@ class TestRealAPIs {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    @Order(2)
 | 
				
			||||||
 | 
					    void testListModelsFromLibrary() {
 | 
				
			||||||
 | 
					        testEndpointReachability();
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            assertNotNull(ollamaAPI.listModelsFromLibrary());
 | 
				
			||||||
 | 
					            ollamaAPI.listModelsFromLibrary().forEach(System.out::println);
 | 
				
			||||||
 | 
					        } catch (IOException | OllamaBaseException | InterruptedException | URISyntaxException e) {
 | 
				
			||||||
 | 
					            fail(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
    @Order(2)
 | 
					    @Order(2)
 | 
				
			||||||
    void testPullModel() {
 | 
					    void testPullModel() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user