mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 22:44:36 +00:00
@@ -5,7 +5,7 @@ if __name__ == "__main__":
|
||||
"Which movie came out first: Oppenheimer, or "
|
||||
"Are You There God It's Me Margaret?"
|
||||
)
|
||||
print( # noqa: T201
|
||||
print(
|
||||
final_chain.with_config(configurable={"chain": "retrieve"}).invoke(
|
||||
{"query": query}
|
||||
)
|
||||
|
@@ -42,7 +42,7 @@ retriever = vector_store.as_retriever(search_kwargs={"k": 3})
|
||||
# Please remove this and/or adapt to your use case!
|
||||
inserted_lines = populate(vector_store)
|
||||
if inserted_lines:
|
||||
print(f"Done ({inserted_lines} lines inserted).") # noqa: T201
|
||||
print(f"Done ({inserted_lines} lines inserted).")
|
||||
|
||||
entomology_template = """
|
||||
You are an expert entomologist, tasked with answering enthusiast biologists' questions.
|
||||
|
@@ -2,4 +2,4 @@ from csv_agent.agent import agent_executor
|
||||
|
||||
if __name__ == "__main__":
|
||||
question = "who was in cabin c28?"
|
||||
print(agent_executor.invoke({"input": question})) # noqa: T201
|
||||
print(agent_executor.invoke({"input": question}))
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from elastic_query_generator.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(chain.invoke({"input": "how many customers named Carol"})) # noqa: T201
|
||||
print(chain.invoke({"input": "how many customers named Carol"}))
|
||||
|
@@ -2,7 +2,7 @@ from neo4j_advanced_rag.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "What is the plot of the Dune?"
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke(
|
||||
{"question": original_query},
|
||||
{"configurable": {"strategy": "parent_strategy"}},
|
||||
|
@@ -2,4 +2,4 @@ from neo4j_cypher_ft.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "Did tom cruis act in top gun?"
|
||||
print(chain.invoke({"question": original_query})) # noqa: T201
|
||||
print(chain.invoke({"question": original_query}))
|
||||
|
@@ -2,7 +2,7 @@ from neo4j_cypher_memory.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "Who played in Top Gun?"
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke(
|
||||
{
|
||||
"question": original_query,
|
||||
@@ -12,7 +12,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
)
|
||||
follow_up_query = "Did they play in any other movies?"
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke(
|
||||
{
|
||||
"question": follow_up_query,
|
||||
|
@@ -2,4 +2,4 @@ from neo4j_cypher.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "Who played in Top Gun?"
|
||||
print(chain.invoke({"question": original_query})) # noqa: T201
|
||||
print(chain.invoke({"question": original_query}))
|
||||
|
@@ -4,7 +4,7 @@ if __name__ == "__main__":
|
||||
text = "Harrison works at LangChain, which is located in San Francisco"
|
||||
allowed_nodes = ["Person", "Organization", "Location"]
|
||||
allowed_relationships = ["WORKS_AT", "LOCATED_IN"]
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain(
|
||||
text,
|
||||
allowed_nodes=allowed_nodes,
|
||||
|
@@ -2,4 +2,4 @@ from neo4j_parent.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "What is the plot of the Dune?"
|
||||
print(chain.invoke(original_query)) # noqa: T201
|
||||
print(chain.invoke(original_query))
|
||||
|
@@ -11,7 +11,7 @@ if __name__ == "__main__":
|
||||
"\n\n1. John Travolta\n2. John McDonough",
|
||||
)
|
||||
]
|
||||
print(agent_executor.invoke({"input": original_query})) # noqa: T201
|
||||
print( # noqa: T201
|
||||
print(agent_executor.invoke({"input": original_query}))
|
||||
print(
|
||||
agent_executor.invoke({"input": followup_query, "chat_history": chat_history})
|
||||
)
|
||||
|
@@ -34,7 +34,7 @@ def store_movie_rating(movie: str, rating: int):
|
||||
try:
|
||||
return response[0]["response"]
|
||||
except Exception as e:
|
||||
print(e) # noqa: T201
|
||||
print(e)
|
||||
return "Something went wrong"
|
||||
|
||||
|
||||
|
@@ -11,7 +11,7 @@ if __name__ == "__main__":
|
||||
"\n\n1. John Travolta\n2. John McDonough",
|
||||
)
|
||||
]
|
||||
print(agent_executor.invoke({"input": original_query})) # noqa: T201
|
||||
print( # noqa: T201
|
||||
print(agent_executor.invoke({"input": original_query}))
|
||||
print(
|
||||
agent_executor.invoke({"input": followup_query, "chat_history": chat_history})
|
||||
)
|
||||
|
@@ -35,7 +35,7 @@ def store_movie_rating(movie: str, rating: int):
|
||||
try:
|
||||
return response[0]["response"]
|
||||
except Exception as e:
|
||||
print(e) # noqa: T201
|
||||
print(e)
|
||||
return "Something went wrong"
|
||||
|
||||
|
||||
|
@@ -4,13 +4,13 @@ if __name__ == "__main__":
|
||||
user_id = "user_id_1"
|
||||
session_id = "session_id_1"
|
||||
original_query = "What is the plot of the Dune?"
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke(
|
||||
{"question": original_query, "user_id": user_id, "session_id": session_id}
|
||||
)
|
||||
)
|
||||
follow_up_query = "Tell me more about Leto"
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke(
|
||||
{"question": follow_up_query, "user_id": user_id, "session_id": session_id}
|
||||
)
|
||||
|
@@ -7,7 +7,7 @@ from langchain_nvidia_aiplay import NVIDIAEmbeddings
|
||||
from langchain_text_splitters.character import CharacterTextSplitter
|
||||
|
||||
if os.environ.get("NVIDIA_API_KEY", "").startswith("nvapi-"):
|
||||
print("Valid NVIDIA_API_KEY already in environment. Delete to reset") # noqa: T201
|
||||
print("Valid NVIDIA_API_KEY already in environment. Delete to reset")
|
||||
else:
|
||||
nvapi_key = getpass.getpass("NVAPI Key (starts with nvapi-): ")
|
||||
assert nvapi_key.startswith("nvapi-"), f"{nvapi_key[:5]}... is not a valid key"
|
||||
|
@@ -23,7 +23,7 @@ INGESTION_CHUNK_SIZE = 500
|
||||
INGESTION_CHUNK_OVERLAP = 0
|
||||
|
||||
if os.environ.get("NVIDIA_API_KEY", "").startswith("nvapi-"):
|
||||
print("Valid NVIDIA_API_KEY already in environment. Delete to reset") # noqa: T201
|
||||
print("Valid NVIDIA_API_KEY already in environment. Delete to reset")
|
||||
else:
|
||||
nvapi_key = getpass.getpass("NVAPI Key (starts with nvapi-): ")
|
||||
assert nvapi_key.startswith("nvapi-"), f"{nvapi_key[:5]}... is not a valid key"
|
||||
|
@@ -6,4 +6,4 @@ if __name__ == "__main__":
|
||||
"First do background research on the sender and topics to make sure you"
|
||||
" understand the context, then write the draft."
|
||||
)
|
||||
print(agent_executor.invoke({"input": question, "chat_history": []})) # noqa: T201
|
||||
print(agent_executor.invoke({"input": question, "chat_history": []}))
|
||||
|
@@ -2,4 +2,4 @@ from openai_functions_agent.agent import agent_executor
|
||||
|
||||
if __name__ == "__main__":
|
||||
question = "who won the womens world cup in 2023?"
|
||||
print(agent_executor.invoke({"input": question, "chat_history": []})) # noqa: T201
|
||||
print(agent_executor.invoke({"input": question, "chat_history": []}))
|
||||
|
@@ -18,7 +18,7 @@ FULL_PROMPT = """# Context
|
||||
```json
|
||||
{json_format}
|
||||
```
|
||||
""" # noqa: E50
|
||||
"""
|
||||
|
||||
NUM_PLATES_PROMPT = """- There {num_plates_str} in this data."""
|
||||
ROWS_PROMPT = """- Each plate has {num_rows} rows."""
|
||||
|
@@ -68,7 +68,7 @@ if __name__ == "__main__":
|
||||
from langchain_text_splitters import RecursiveCharacterTextSplitter # noqa
|
||||
from langchain_community.document_loaders.recursive_url_loader import (
|
||||
RecursiveUrlLoader,
|
||||
) # noqa
|
||||
)
|
||||
|
||||
# The attention is all you need paper
|
||||
# Could add more parsing here, as it's very raw.
|
||||
|
@@ -26,7 +26,7 @@ retriever = vector_store.as_retriever(search_kwargs={"k": 3})
|
||||
|
||||
inserted_lines = populate(vector_store)
|
||||
if inserted_lines:
|
||||
print(f"Done ({inserted_lines} lines inserted).") # noqa: T201
|
||||
print(f"Done ({inserted_lines} lines inserted).")
|
||||
|
||||
entomology_template = """
|
||||
You are an expert entomologist, tasked with answering enthusiast biologists' questions.
|
||||
|
@@ -2,4 +2,4 @@ from astradb_entomology_rag import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
response = chain.invoke("Are there more coleoptera or bugs?")
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
@@ -3,4 +3,4 @@ from rag_aws_bedrock.chain import chain
|
||||
if __name__ == "__main__":
|
||||
query = "What is this data about?"
|
||||
|
||||
print(chain.invoke(query)) # noqa: T201
|
||||
print(chain.invoke(query))
|
||||
|
@@ -3,4 +3,4 @@ from rag_aws_kendra.chain import chain
|
||||
if __name__ == "__main__":
|
||||
query = "Does Kendra support table extraction?"
|
||||
|
||||
print(chain.invoke(query)) # noqa: T201
|
||||
print(chain.invoke(query))
|
||||
|
@@ -66,7 +66,7 @@ def generate_img_summaries(img_base64_list):
|
||||
image_summaries.append(image_summarize(base64_image, prompt))
|
||||
processed_images.append(base64_image)
|
||||
except Exception as e:
|
||||
print(f"Error with image {i+1}: {e}") # noqa: T201
|
||||
print(f"Error with image {i+1}: {e}")
|
||||
|
||||
return image_summaries, processed_images
|
||||
|
||||
@@ -178,14 +178,14 @@ def create_multi_vector_retriever(
|
||||
# Load PDF
|
||||
doc_path = Path(__file__).parent / "docs/DDOG_Q3_earnings_deck.pdf"
|
||||
rel_doc_path = doc_path.relative_to(Path.cwd())
|
||||
print("Extract slides as images") # noqa: T201
|
||||
print("Extract slides as images")
|
||||
pil_images = get_images_from_pdf(rel_doc_path)
|
||||
|
||||
# Convert to b64
|
||||
images_base_64 = [convert_to_base64(i) for i in pil_images]
|
||||
|
||||
# Image summaries
|
||||
print("Generate image summaries") # noqa: T201
|
||||
print("Generate image summaries")
|
||||
image_summaries, images_base_64_processed = generate_img_summaries(images_base_64)
|
||||
|
||||
# The vectorstore to use to index the images summaries
|
||||
|
@@ -27,14 +27,14 @@ doc_path = Path(__file__).parent / "docs/DDOG_Q3_earnings_deck.pdf"
|
||||
img_dump_path = Path(__file__).parent / "docs/"
|
||||
rel_doc_path = doc_path.relative_to(Path.cwd())
|
||||
rel_img_dump_path = img_dump_path.relative_to(Path.cwd())
|
||||
print("pdf index") # noqa: T201
|
||||
print("pdf index")
|
||||
pil_images = get_images_from_pdf(rel_doc_path, rel_img_dump_path)
|
||||
print("done") # noqa: T201
|
||||
print("done")
|
||||
vectorstore = Path(__file__).parent / "chroma_db_multi_modal"
|
||||
re_vectorstore_path = vectorstore.relative_to(Path.cwd())
|
||||
|
||||
# Load embedding function
|
||||
print("Loading embedding function") # noqa: T201
|
||||
print("Loading embedding function")
|
||||
embedding = OpenCLIPEmbeddings(model_name="ViT-H-14", checkpoint="laion2b_s32b_b79k")
|
||||
|
||||
# Create chroma
|
||||
@@ -54,5 +54,5 @@ image_uris = sorted(
|
||||
)
|
||||
|
||||
# Add images
|
||||
print("Embedding images") # noqa: T201
|
||||
print("Embedding images")
|
||||
vectorstore_mmembd.add_images(uris=image_uris)
|
||||
|
@@ -14,7 +14,7 @@ if __name__ == "__main__":
|
||||
"chat_history": [],
|
||||
}
|
||||
)
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
||||
follow_up_question = "What are their objectives?"
|
||||
|
||||
@@ -30,4 +30,4 @@ if __name__ == "__main__":
|
||||
}
|
||||
)
|
||||
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
@@ -2,4 +2,4 @@ from rag_fusion.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "impact of climate change"
|
||||
print(chain.invoke(original_query)) # noqa: T201
|
||||
print(chain.invoke(original_query))
|
||||
|
@@ -27,14 +27,14 @@ doc_path = Path(__file__).parent / "docs/DDOG_Q3_earnings_deck.pdf"
|
||||
img_dump_path = Path(__file__).parent / "docs/"
|
||||
rel_doc_path = doc_path.relative_to(Path.cwd())
|
||||
rel_img_dump_path = img_dump_path.relative_to(Path.cwd())
|
||||
print("pdf index") # noqa: T201
|
||||
print("pdf index")
|
||||
pil_images = get_images_from_pdf(rel_doc_path, rel_img_dump_path)
|
||||
print("done") # noqa: T201
|
||||
print("done")
|
||||
vectorstore = Path(__file__).parent / "chroma_db_multi_modal"
|
||||
re_vectorstore_path = vectorstore.relative_to(Path.cwd())
|
||||
|
||||
# Load embedding function
|
||||
print("Loading embedding function") # noqa: T201
|
||||
print("Loading embedding function")
|
||||
embedding = OpenCLIPEmbeddings(model_name="ViT-H-14", checkpoint="laion2b_s32b_b79k")
|
||||
|
||||
# Create chroma
|
||||
@@ -54,5 +54,5 @@ image_uris = sorted(
|
||||
)
|
||||
|
||||
# Add images
|
||||
print("Embedding images") # noqa: T201
|
||||
print("Embedding images")
|
||||
vectorstore_mmembd.add_images(uris=image_uris)
|
||||
|
@@ -6,4 +6,4 @@ if __name__ == "__main__":
|
||||
"is 555-555-5555. And my email is lovely.pirate@gmail.com. Have a nice day.",
|
||||
"chat_history": [],
|
||||
}
|
||||
print(chain.invoke(query)) # noqa: T201
|
||||
print(chain.invoke(query))
|
||||
|
@@ -2,4 +2,4 @@ from rag_google_cloud_vertexai_search.chain import chain
|
||||
|
||||
if __name__ == "__main__":
|
||||
query = "Who is the CEO of Google Cloud?"
|
||||
print(chain.invoke(query)) # noqa: T201
|
||||
print(chain.invoke(query))
|
||||
|
@@ -20,7 +20,7 @@ vectorstore = Path(__file__).parent / "chroma_db_multi_modal"
|
||||
re_vectorstore_path = vectorstore.relative_to(Path.cwd())
|
||||
|
||||
# Load embedding function
|
||||
print("Loading embedding function") # noqa: T201
|
||||
print("Loading embedding function")
|
||||
embedding = OpenCLIPEmbeddings(model_name="ViT-H-14", checkpoint="laion2b_s32b_b79k")
|
||||
|
||||
# Create chroma
|
||||
@@ -31,5 +31,5 @@ vectorstore_mmembd = Chroma(
|
||||
)
|
||||
|
||||
# Add images
|
||||
print("Embedding images") # noqa: T201
|
||||
print("Embedding images")
|
||||
vectorstore_mmembd.add_images(uris=image_uris)
|
||||
|
@@ -63,7 +63,7 @@ def generate_img_summaries(img_base64_list):
|
||||
image_summaries.append(image_summarize(base64_image, prompt))
|
||||
processed_images.append(base64_image)
|
||||
except Exception as e:
|
||||
print(f"Error with image {i+1}: {e}") # noqa: T201
|
||||
print(f"Error with image {i+1}: {e}")
|
||||
|
||||
return image_summaries, processed_images
|
||||
|
||||
@@ -162,14 +162,14 @@ def create_multi_vector_retriever(vectorstore, image_summaries, images):
|
||||
# Load images
|
||||
doc_path = Path(__file__).parent / "docs/"
|
||||
rel_doc_path = doc_path.relative_to(Path.cwd())
|
||||
print("Read images") # noqa: T201
|
||||
print("Read images")
|
||||
pil_images = get_images(rel_doc_path)
|
||||
|
||||
# Convert to b64
|
||||
images_base_64 = [convert_to_base64(i) for i in pil_images]
|
||||
|
||||
# Image summaries
|
||||
print("Generate image summaries") # noqa: T201
|
||||
print("Generate image summaries")
|
||||
image_summaries, images_base_64_processed = generate_img_summaries(images_base_64)
|
||||
|
||||
# The vectorstore to use to index the images summaries
|
||||
|
@@ -41,7 +41,7 @@ index_settings = {
|
||||
|
||||
response = client.indices.create(index=OPENSEARCH_INDEX_NAME, body=index_settings)
|
||||
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
||||
|
||||
# Insert docs
|
||||
@@ -57,4 +57,4 @@ for each in docs:
|
||||
|
||||
response = client.index(index=OPENSEARCH_INDEX_NAME, body=document, refresh=True)
|
||||
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
@@ -62,7 +62,7 @@ def generate_img_summaries(img_base64_list):
|
||||
image_summaries.append(image_summarize(base64_image, prompt))
|
||||
processed_images.append(base64_image)
|
||||
except Exception as e:
|
||||
print(f"Error with image {i+1}: {e}") # noqa: T201
|
||||
print(f"Error with image {i+1}: {e}")
|
||||
|
||||
return image_summaries, processed_images
|
||||
|
||||
@@ -151,14 +151,14 @@ if __name__ == "__main__":
|
||||
doc_path = Path(__file__).parent / "docs/nvda-f3q24-investor-presentation-final.pdf"
|
||||
rel_doc_path = doc_path.relative_to(Path.cwd())
|
||||
|
||||
print("Extract slides as images") # noqa: T201
|
||||
print("Extract slides as images")
|
||||
pil_images = get_images_from_pdf(rel_doc_path)
|
||||
|
||||
# Convert to b64
|
||||
images_base_64 = [convert_to_base64(i) for i in pil_images]
|
||||
|
||||
# Generate image summaries
|
||||
print("Generate image summaries") # noqa: T201
|
||||
print("Generate image summaries")
|
||||
image_summaries, images_base_64_processed = generate_img_summaries(images_base_64)
|
||||
|
||||
# Create documents
|
||||
|
@@ -17,7 +17,7 @@ def ingest_documents():
|
||||
data_path = "data/"
|
||||
doc = [os.path.join(data_path, file) for file in os.listdir(data_path)][0]
|
||||
|
||||
print("Parsing 10k filing doc for NIKE", doc) # noqa: T201
|
||||
print("Parsing 10k filing doc for NIKE", doc)
|
||||
|
||||
text_splitter = RecursiveCharacterTextSplitter(
|
||||
chunk_size=1500, chunk_overlap=100, add_start_index=True
|
||||
@@ -25,7 +25,7 @@ def ingest_documents():
|
||||
loader = UnstructuredFileLoader(doc, mode="single", strategy="fast")
|
||||
chunks = loader.load_and_split(text_splitter)
|
||||
|
||||
print("Done preprocessing. Created", len(chunks), "chunks of the original pdf") # noqa: T201
|
||||
print("Done preprocessing. Created", len(chunks), "chunks of the original pdf")
|
||||
# Create vectorstore
|
||||
embedder = HuggingFaceEmbeddings(model_name=EMBED_MODEL)
|
||||
|
||||
|
@@ -14,7 +14,7 @@ if __name__ == "__main__":
|
||||
"chat_history": [],
|
||||
}
|
||||
)
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
||||
follow_up_question = "What are their objectives?"
|
||||
|
||||
@@ -30,4 +30,4 @@ if __name__ == "__main__":
|
||||
}
|
||||
)
|
||||
|
||||
print(response) # noqa: T201
|
||||
print(response)
|
||||
|
@@ -47,7 +47,7 @@ def load_ts_git_dataset(
|
||||
with open(json_file_path, "w") as json_file:
|
||||
json_file.write(response.text)
|
||||
else:
|
||||
print(f"Failed to download JSON file. Status code: {response.status_code}") # noqa: T201
|
||||
print(f"Failed to download JSON file. Status code: {response.status_code}")
|
||||
|
||||
loader = JSONLoader(
|
||||
file_path=json_file_path,
|
||||
|
@@ -47,7 +47,7 @@ def load_ts_git_dataset(
|
||||
with open(json_file_path, "w") as json_file:
|
||||
json_file.write(response.text)
|
||||
else:
|
||||
print(f"Failed to download JSON file. Status code: {response.status_code}") # noqa: T201
|
||||
print(f"Failed to download JSON file. Status code: {response.status_code}")
|
||||
|
||||
loader = JSONLoader(
|
||||
file_path=json_file_path,
|
||||
|
@@ -40,7 +40,7 @@ def scrape_text(url: str):
|
||||
else:
|
||||
return f"Failed to retrieve the webpage: Status code {response.status_code}"
|
||||
except Exception as e:
|
||||
print(e) # noqa: T201
|
||||
print(e)
|
||||
return f"Failed to retrieve the webpage: {e}"
|
||||
|
||||
|
||||
|
@@ -19,15 +19,15 @@ url = (
|
||||
)
|
||||
# Check if file is present in the current directory
|
||||
if not os.path.exists(file_name):
|
||||
print(f"'{file_name}' not found. Downloading...") # noqa: T201
|
||||
print(f"'{file_name}' not found. Downloading...")
|
||||
# Download the file
|
||||
response = requests.get(url)
|
||||
response.raise_for_status() # Raise an exception for HTTP errors
|
||||
with open(file_name, "wb") as f:
|
||||
f.write(response.content)
|
||||
print(f"'{file_name}' has been downloaded.") # noqa: T201
|
||||
print(f"'{file_name}' has been downloaded.")
|
||||
else:
|
||||
print(f"'{file_name}' already exists in the current directory.") # noqa: T201
|
||||
print(f"'{file_name}' already exists in the current directory.")
|
||||
|
||||
# Add the LLM downloaded from HF
|
||||
model_path = file_name
|
||||
|
@@ -17,6 +17,6 @@ chain = chain_notypes.with_types(input_type=InputType)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print( # noqa: T201
|
||||
print(
|
||||
chain.invoke({"question": "who is typically older: point guards or centers?"})
|
||||
)
|
||||
|
@@ -40,7 +40,7 @@ def scrape_text(url: str):
|
||||
else:
|
||||
return f"Failed to retrieve the webpage: Status code {response.status_code}"
|
||||
except Exception as e:
|
||||
print(e) # noqa: T201
|
||||
print(e)
|
||||
return f"Failed to retrieve the webpage: {e}"
|
||||
|
||||
|
||||
|
@@ -2,4 +2,4 @@ from xml_agent.agent import agent_executor
|
||||
|
||||
if __name__ == "__main__":
|
||||
question = "who won the womens world cup in 2023?"
|
||||
print(agent_executor.invoke({"question": question, "chat_history": []})) # noqa: T201
|
||||
print(agent_executor.invoke({"question": question, "chat_history": []}))
|
||||
|
Reference in New Issue
Block a user