small improvements

- wait for getting results on crawl: sometimes crawl takes some a second to save the data on the db and this causes response.data to be empty
- added timeout value to test script
- increased http client timeout (llm extract was failing on e2e tests)
- fixed env path on test script
This commit is contained in:
rafaelsideguide
2024-08-09 11:13:14 -03:00
parent b2e1b2ca68
commit b802ea02a1
4 changed files with 13 additions and 5 deletions
+5 -1
View File
@@ -33,7 +33,11 @@ func main() {
if err != nil {
log.Fatalf("Failed to crawl URL: %v", err)
}
fmt.Println(crawlResult)
jsonCrawlResult, err := json.MarshalIndent(crawlResult, "", " ")
if err != nil {
log.Fatalf("Failed to marshal crawl result: %v", err)
}
fmt.Println(string(jsonCrawlResult))
// LLM Extraction using JSON schema
jsonSchema := map[string]any{