This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Simple LangGraph solution with 3 tools: | |
1. Fetch web content using BeautifulSoup | |
2. Summarize content using OLLAMA | |
3. Persist summarized content to local file | |
""" | |
import uuid | |
import requests |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
LangGraph Web Content Agent using ToolNode and Agent approach | |
Proper implementation with agent decision-making and tool execution | |
""" | |
import requests | |
from datetime import datetime | |
from typing import TypedDict, List, Annotated | |
from langgraph.graph import StateGraph, END |
This file contains hidden or 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
from typing import TypedDict, Annotated, List, Literal | |
from langgraph.graph import StateGraph, END, START | |
from langchain_core.tools import tool | |
from langchain_ollama import ChatOllama | |
from bs4 import BeautifulSoup | |
from langchain_core.runnables import RunnablePassthrough | |
from langchain_core.prompts import PromptTemplate | |
from langchain_core.output_parsers import StrOutputParser | |
import os | |
import requests |
This file contains hidden or 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
from typing import Dict, Any, List, TypedDict, Literal | |
import re | |
from langchain_ollama import ChatOllama | |
from langchain.tools import tool | |
from langgraph.graph import StateGraph, END, START | |
from numpy.matlib import empty | |
# -------------------------- | |
# TOOLS |
This file contains hidden or 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
from typing import List, Dict, Any, Optional, TypedDict | |
import re | |
from langchain.chains.question_answering.map_reduce_prompt import messages | |
from langchain_core.output_parsers import StrOutputParser | |
from langchain_core.prompts import PromptTemplate | |
from langchain_core.messages import HumanMessage | |
from langchain_core.runnables import RunnablePassthrough | |
from langchain_ollama import ChatOllama | |
from langgraph.graph import StateGraph, END, START |
This file contains hidden or 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
. ____ _ __ _ _ | |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
\\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
' |____| .__|_| |_|_| |_\__, | / / / / | |
=========|_|==============|___/=/_/_/_/ | |
:: Spring Boot :: (v2.6.4) | |
2022-03-13 22:35:57.577 INFO 10698 --- [ restartedMain] c.s.d.DemoGraphQlApplicationKt : Starting DemoGraphQlApplicationKt using Java 11.0.12 on Krishnan-MBP13.local with PID 10698 (/Users/krishnansriramrama/Projects/Springboot/java/DemoGraphQL/target/classes started by krishnansriramrama in /Users/krishnansriramrama/Projects/Springboot/java/DemoGraphQL) | |
2022-03-13 22:35:57.578 INFO 10698 --- [ restartedMain] c.s.d.DemoGraphQlApplicationKt : No active profile set, falling back to 1 default profile: "default" |
This file contains hidden or 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
const PercentageProcessor = require('./percentagecalculator'); | |
const NonPercentileProcessor = require('./nonpercentilescores'); | |
const GradeScores = require('./gradescores'); | |
const GenericGPAProcessor = require('./genericgpa'); | |
const console = require('./../config/logconfig'); | |
const Publisher = require('./../publish'); | |
const extractAndPublishGPAScores = async (jsonData, lw_ocrText) => { | |
if (jsonData && GenericGPAProcessor.hasKeywordText(lw_ocrText) === true) { | |
await handleGenericGPAScores(lw_ocrText, jsonData); |
This file contains hidden or 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
{"lastUpload":"2022-02-27T13:45:52.706Z","extensionVersion":"v3.4.3"} |