Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated relative paths #906

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gpt_researcher/config/variables/default.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from gpt_researcher.config.variables.retrievers import RetrieversConfig, VALID_RETRIEVERS
from gpt_researcher.config.variables.base import BaseConfig
from .retrievers import RetrieversConfig, VALID_RETRIEVERS
from .base import BaseConfig


class DefaultConfig(BaseConfig):
Expand Down
6 changes: 3 additions & 3 deletions gpt_researcher/context/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
EmbeddingsFilter,
)
from langchain.text_splitter import RecursiveCharacterTextSplitter
from gpt_researcher.vector_store import VectorStoreWrapper
from gpt_researcher.utils.costs import estimate_embedding_cost
from gpt_researcher.memory.embeddings import OPENAI_EMBEDDING_MODEL
from ..vector_store import VectorStoreWrapper
from ..utils.costs import estimate_embedding_cost
from ..memory.embeddings import OPENAI_EMBEDDING_MODEL


class VectorstoreCompressor:
Expand Down
6 changes: 2 additions & 4 deletions gpt_researcher/master/actions/query_processing.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import json
import re
import json_repair
from typing import List, Dict, Any
from gpt_researcher.config.config import Config
from gpt_researcher.utils.llm import create_chat_completion
from gpt_researcher.master.prompts import auto_agent_instructions, generate_search_queries_prompt
from ...utils.llm import create_chat_completion
from ..prompts import auto_agent_instructions, generate_search_queries_prompt


async def choose_agent(
Expand Down
10 changes: 5 additions & 5 deletions gpt_researcher/master/actions/report_generation.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import asyncio
from typing import List, Dict, Any
from gpt_researcher.config.config import Config
from gpt_researcher.utils.llm import create_chat_completion
from gpt_researcher.utils.logger import get_formatted_logger
from gpt_researcher.master.prompts import (
from ...config.config import Config
from ...utils.llm import create_chat_completion
from ...utils.logger import get_formatted_logger
from ..prompts import (
generate_report_introduction,
generate_draft_titles_prompt,
generate_report_conclusion,
get_prompt_by_report_type,
)
from gpt_researcher.utils.enum import Tone
from ...utils.enum import Tone

logger = get_formatted_logger()

Expand Down
2 changes: 1 addition & 1 deletion gpt_researcher/master/actions/retriever.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import List, Type
from gpt_researcher.config.config import Config
from ...config.config import Config

def get_retriever(retriever):
"""
Expand Down
2 changes: 1 addition & 1 deletion gpt_researcher/master/actions/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Dict, Any, Callable
from fastapi import WebSocket
from gpt_researcher.utils.logger import get_formatted_logger
from ...utils.logger import get_formatted_logger

logger = get_formatted_logger()

Expand Down
6 changes: 3 additions & 3 deletions gpt_researcher/master/actions/web_scraping.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import asyncio
from typing import List, Dict, Any
from gpt_researcher.scraper.scraper import Scraper
from gpt_researcher.config.config import Config
from gpt_researcher.utils.logger import get_formatted_logger
from ...scraper.scraper import Scraper
from ...config.config import Config
from ...utils.logger import get_formatted_logger

logger = get_formatted_logger()

Expand Down
8 changes: 4 additions & 4 deletions gpt_researcher/master/agent/context_manager.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import asyncio
from typing import List, Dict, Optional, Set

from gpt_researcher.context.compression import ContextCompressor, WrittenContentCompressor, VectorstoreCompressor
from gpt_researcher.document import DocumentLoader, LangChainDocumentLoader
from gpt_researcher.utils.enum import ReportSource
from gpt_researcher.master.actions.utils import stream_output
from ...context.compression import ContextCompressor, WrittenContentCompressor, VectorstoreCompressor
from ...document import DocumentLoader, LangChainDocumentLoader
from ...utils.enum import ReportSource
from ..actions.utils import stream_output


class ContextManager:
Expand Down
20 changes: 10 additions & 10 deletions gpt_researcher/master/agent/master.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from typing import Optional, List, Dict, Any, Set

from gpt_researcher.config import Config
from gpt_researcher.memory import Memory
from gpt_researcher.utils.enum import ReportSource, ReportType, Tone
from gpt_researcher.llm_provider import GenericLLMProvider
from gpt_researcher.master.agent.researcher import ResearchConductor
from gpt_researcher.master.agent.scraper import ReportScraper
from gpt_researcher.master.agent.writer import ReportGenerator
from gpt_researcher.master.agent.context_manager import ContextManager
from gpt_researcher.master.actions import get_retrievers, choose_agent
from gpt_researcher.vector_store import VectorStoreWrapper
from ...config import Config
from ...memory import Memory
from ...utils.enum import ReportSource, ReportType, Tone
from ...llm_provider import GenericLLMProvider
from ..agent.researcher import ResearchConductor
from ..agent.scraper import ReportScraper
from ..agent.writer import ReportGenerator
from ..agent.context_manager import ContextManager
from ..actions import get_retrievers, choose_agent
from ...vector_store import VectorStoreWrapper


class GPTResearcher:
Expand Down
8 changes: 4 additions & 4 deletions gpt_researcher/master/agent/researcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import random
from typing import Dict, Optional

from gpt_researcher.master.actions.utils import stream_output
from gpt_researcher.master.actions import get_sub_queries, scrape_urls
from gpt_researcher.document import DocumentLoader, LangChainDocumentLoader
from gpt_researcher.utils.enum import ReportSource, ReportType, Tone
from ..actions.utils import stream_output
from ..actions import get_sub_queries, scrape_urls
from ...document import DocumentLoader, LangChainDocumentLoader
from ...utils.enum import ReportSource, ReportType, Tone


class ResearchConductor:
Expand Down
2 changes: 1 addition & 1 deletion gpt_researcher/master/agent/scraper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
from typing import List, Dict
from gpt_researcher.master.actions import scrape_urls
from ..actions import scrape_urls


class ReportScraper:
Expand Down
4 changes: 2 additions & 2 deletions gpt_researcher/master/agent/writer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict, Optional

from gpt_researcher.utils.llm import construct_subtopics
from gpt_researcher.master.actions import (
from ...utils.llm import construct_subtopics
from ..actions import (
stream_output,
generate_report,
generate_draft_section_titles,
Expand Down
2 changes: 1 addition & 1 deletion gpt_researcher/master/prompts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import warnings
from datetime import date, datetime, timezone

from gpt_researcher.utils.enum import ReportSource, ReportType, Tone
from ..utils.enum import ReportSource, ReportType, Tone


def generate_search_queries_prompt(
Expand Down