Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix: params
PeriniMf4c40edbb68c
diff --git a/pydantic_class.py b/pydantic_class.pynew file mode 100644index 00000000..87f2c56d--- /dev/null+++ b/pydantic_class.py@@ -0,0 +1,5 @@++from langchain_core.pydantic_v1 import BaseModel, Field++class _Response(BaseModel):+ title: str = Field(description='Title of the news')diff --git a/yosoai/class_generator.py b/yosoai/class_generator.pyindex c3a7835a..31729b37 100644--- a/yosoai/class_generator.py+++ b/yosoai/class_generator.py@@ -6,12 +6,11 @@ from langchain_core.pydantic_v1 import Fieldfrom langchain.output_parsers import PydanticOutputParserclass Generator:- def __init__(self, values: list[dict], api_key: str, temperature_param: float = 0.0, model_name: str = "gpt-3.5-turbo") -> dict:+ def __init__(self, api_key: str, temperature_param: float = 0.0, model_name: str = "gpt-3.5-turbo") -> dict:"""Initializes the Generator object.Args:- values (list): A list of values used for class creation.api_key (str): The API key for accessing the language model.temperature_param (float): A parameter controlling the randomness of the language model's output.model_name (str): The name of the language model to be used (default: "gpt-3.5-turbo"). Alldiff --git a/yosoai/pydantic_class.py b/yosoai/pydantic_class.pyindex 7af62077..b04a1658 100644--- a/yosoai/pydantic_class.py+++ b/yosoai/pydantic_class.py@@ -1,4 +1,4 @@from langchain_core.pydantic_v1 import BaseModel, Fieldclass _Response(BaseModel):- title: str = Field(description='Title of the news')+ title_news: str = Field(description='Give me the name of the news')diff --git a/yosoai/request.py b/yosoai/request.pyindex 537b3018..7333d405 100644--- a/yosoai/request.py+++ b/yosoai/request.py@@ -1,8 +1,8 @@import timefrom typing import Listfrom .getter import remover-from .class_creator import create_classfrom .class_generator import Generator+from .class_creator import create_classfrom .token_calculator import truncate_text_tokensEMBEDDING_ENCODING = 'cl100k_base'