-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
Aiden Blake lives in San Francisco, California. He works as a software engineer at a leading tech company. Aiden is 28 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ella Parker resides in Portland, Oregon. She is a chef at a popular local restaurant. Ella is 26 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Harper Quinn resides in Austin, Texas. She is employed as a marketing manager for a renowned fashion brand. Harper is 32 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Liam Carter lives in New York City, New York. He works as an investment banker on Wall Street. Liam is 35 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ava Morgan resides in Seattle, Washington. She is a graphic designer at a prominent design firm. Ava is 27 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ethan Hayes lives in Chicago, Illinois. He works as a mechanical engineer at a major manufacturing company. Ethan is 30 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Chloe Bennett resides in Denver, Colorado. She is a school teacher at a well-known elementary school. Chloe is 29 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Noah Riley lives in Miami, Florida. He works as a real estate agent for a top realty company. Noah is 33 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Grace Taylor** resides in Boston, Massachusetts. She is a research scientist at a leading pharmaceutical company. Grace is 31 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Mason Brooks lives in Los Angeles, California. He works as a film director in the Hollywood industry. Mason is 37 years old. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from langchain_openai import ChatOpenAI | ||
from langchain_community.document_loaders import DirectoryLoader | ||
from langchain.prompts import ChatPromptTemplate | ||
from langchain.chains.combine_documents import create_stuff_documents_chain | ||
import os | ||
|
||
prompt=ChatPromptTemplate.from_messages( | ||
[ | ||
("system","what are everyone's age:\n\n{context}") | ||
] | ||
) | ||
llm=ChatOpenAI(model="gpt-4o") | ||
chain=create_stuff_documents_chain(llm,prompt) | ||
loader=DirectoryLoader(path=os.getcwd(),glob="**/*.txt") | ||
docs=loader.load() | ||
print(len(docs)) | ||
response=chain.invoke({"context":docs}) | ||
print(response) |
Binary file not shown.