Add pre commit (#26)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import uuid
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
import uuid
|
||||
from base64 import b64encode
|
||||
from hashlib import sha256
|
||||
from hmac import new as hmac_new
|
||||
from typing import Any, Dict, List
|
||||
from typing import List, Dict, Any
|
||||
|
||||
import requests
|
||||
from utils import format_time
|
||||
from .utils import format_time
|
||||
|
||||
|
||||
class CustomSearchTool:
|
||||
|
||||
@@ -3,22 +3,25 @@ import asyncio
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent
|
||||
from agentscope_runtime.engine.helpers.helper import simple_call_agent_direct
|
||||
from configuration import Configuration
|
||||
from custom_search_tool import CustomSearchTool
|
||||
from typing import List, Dict, Any, Optional
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from langchain_core.messages import AIMessage, HumanMessage
|
||||
from langchain_core.runnables import RunnableConfig
|
||||
from langgraph.graph import END, START, StateGraph
|
||||
from langgraph.graph import START, END
|
||||
from langgraph.graph import StateGraph
|
||||
from langgraph.types import Send
|
||||
from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent
|
||||
from agentscope_runtime.engine.helpers.helper import simple_call_agent_direct
|
||||
|
||||
from configuration import Configuration
|
||||
from custom_search_tool import CustomSearchTool
|
||||
from llm_prompts import (
|
||||
answer_instructions,
|
||||
query_writer_instructions,
|
||||
reflection_instructions,
|
||||
web_searcher_instructions,
|
||||
reflection_instructions,
|
||||
answer_instructions,
|
||||
)
|
||||
from llm_utils import call_dashscope, extract_json_from_qwen
|
||||
from state import (
|
||||
@@ -27,12 +30,12 @@ from state import (
|
||||
ReflectionState,
|
||||
WebSearchState,
|
||||
)
|
||||
from utils import (
|
||||
custom_get_citations,
|
||||
custom_resolve_urls,
|
||||
get_current_date,
|
||||
from .utils import (
|
||||
get_research_topic,
|
||||
insert_citation_markers,
|
||||
custom_resolve_urls,
|
||||
custom_get_citations,
|
||||
get_current_date,
|
||||
)
|
||||
|
||||
load_dotenv("../.env")
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from langchain_core.messages import AIMessage, AnyMessage, HumanMessage
|
||||
from datetime import datetime
|
||||
from langchain_core.messages import AnyMessage, AIMessage, HumanMessage
|
||||
|
||||
|
||||
def get_current_date() -> str:
|
||||
def get_current_date():
|
||||
return datetime.now().strftime("%B %d, %Y")
|
||||
|
||||
|
||||
@@ -39,7 +38,7 @@ def get_research_topic(messages: List[AnyMessage]) -> str:
|
||||
return research_topic
|
||||
|
||||
|
||||
def insert_citation_markers(text: str, citations_list: List[Dict]) -> str:
|
||||
def insert_citation_markers(text, citations_list):
|
||||
"""
|
||||
Inserts citation markers into a text string based on start and end indices.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user