-
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
10 changed files
with
295 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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 bs4 import BeautifulSoup | ||
import json | ||
import xmltodict | ||
from langchain.agents import create_json_agent | ||
from langchain.agents.agent_toolkits import JsonToolkit | ||
from langchain.tools.json.tool import JsonSpec | ||
from langchain_openai import ChatOpenAI | ||
|
||
|
||
with open(r"C:\Users\welcome\OneDrive\Documents\GitHub\LLMtutorial\tutorial84\sample.xml","r") as f1: | ||
content=f1.read() | ||
text_content=str(BeautifulSoup(content,"lxml")) | ||
xml_dict=xmltodict.parse(text_content) | ||
spec=JsonSpec(dict_=xml_dict) | ||
toolkit=JsonToolkit(spec=spec) | ||
agent=create_json_agent(llm=ChatOpenAI(temperature=0,model="gpt-4o"),toolkit=toolkit,max_iterations=3000,verbose=True) | ||
response=agent.run("Please give all application names ,you will find it inside application key , it congtains a list") | ||
print(response) |
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,277 @@ | ||
<Configurations> | ||
<Application> | ||
<Name>App1</Name> | ||
<Version>1.0.0</Version> | ||
<Developer>Alice Smith</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Debug</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>100</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>30</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App2</Name> | ||
<Version>2.0.0</Version> | ||
<Developer>Bob Johnson</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Info</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>200</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>60</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App3</Name> | ||
<Version>3.1.0</Version> | ||
<Developer>Charlie Davis</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Warning</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>150</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>45</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App4</Name> | ||
<Version>4.2.1</Version> | ||
<Developer>Dana Lee</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Error</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>120</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>90</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App5</Name> | ||
<Version>5.0.0</Version> | ||
<Developer>Eva Martinez</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Debug</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>300</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>25</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App6</Name> | ||
<Version>1.1.1</Version> | ||
<Developer>Frank Brown</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Info</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>400</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>35</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App7</Name> | ||
<Version>2.2.2</Version> | ||
<Developer>Grace Wilson</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Warning</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>250</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>50</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App8</Name> | ||
<Version>3.3.3</Version> | ||
<Developer>Hank White</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Error</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>220</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>75</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App9</Name> | ||
<Version>4.4.4</Version> | ||
<Developer>Ivy Clark</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Debug</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>180</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>20</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Application> | ||
<Name>App10</Name> | ||
<Version>5.5.5</Version> | ||
<Developer>Jack Lewis</Developer> | ||
<Settings> | ||
<Setting> | ||
<Key>LogLevel</Key> | ||
<Value>Info</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>MaxConnections</Key> | ||
<Value>320</Value> | ||
</Setting> | ||
<Setting> | ||
<Key>Timeout</Key> | ||
<Value>40</Value> | ||
</Setting> | ||
</Settings> | ||
</Application> | ||
<Database> | ||
<Host>localhost</Host> | ||
<Port>5432</Port> | ||
<Username>dbuser</Username> | ||
<Password>dbpass</Password> | ||
<DatabaseName>exampledb</DatabaseName> | ||
<Tables> | ||
<Table> | ||
<Name>Users</Name> | ||
<Columns> | ||
<Column> | ||
<Name>UserID</Name> | ||
<Type>Integer</Type> | ||
<PrimaryKey>true</PrimaryKey> | ||
</Column> | ||
<Column> | ||
<Name>Username</Name> | ||
<Type>String</Type> | ||
<PrimaryKey>false</PrimaryKey> | ||
</Column> | ||
<Column> | ||
<Name>Password</Name> | ||
<Type>String</Type> | ||
<PrimaryKey>false</PrimaryKey> | ||
</Column> | ||
</Columns> | ||
</Table> | ||
<Table> | ||
<Name>Orders</Name> | ||
<Columns> | ||
<Column> | ||
<Name>OrderID</Name> | ||
<Type>Integer</Type> | ||
<PrimaryKey>true</PrimaryKey> | ||
</Column> | ||
<Column> | ||
<Name>UserID</Name> | ||
<Type>Integer</Type> | ||
<PrimaryKey>false</PrimaryKey> | ||
</Column> | ||
<Column> | ||
<Name>Product</Name> | ||
<Type>String</Type> | ||
<PrimaryKey>false</PrimaryKey> | ||
</Column> | ||
<Column> | ||
<Name>Quantity</Name> | ||
<Type>Integer</Type> | ||
<PrimaryKey>false</PrimaryKey> | ||
</Column> | ||
</Columns> | ||
</Table> | ||
</Tables> | ||
</Database> | ||
<Network> | ||
<Endpoints> | ||
<Endpoint> | ||
<Name>API</Name> | ||
<URL>https://api.example.com</URL> | ||
<Methods> | ||
<Method>GET</Method> | ||
<Method>POST</Method> | ||
</Methods> | ||
</Endpoint> | ||
<Endpoint> | ||
<Name>Auth</Name> | ||
<URL>https://auth.example.com</URL> | ||
<Methods> | ||
<Method>POST</Method> | ||
</Methods> | ||
</Endpoint> | ||
</Endpoints> | ||
</Network> | ||
<Security> | ||
<Encryption> | ||
<Algorithm>AES-256</Algorithm> | ||
<Key>supersecretkey</Key> | ||
</Encryption> | ||
<Authentication> | ||
<Type>OAuth2</Type> | ||
<TokenEndpoint>https://auth.example.com/token</TokenEndpoint> | ||
<ClientID>clientid</ClientID> | ||
<ClientSecret>clientsecret</ClientSecret> | ||
</Authentication> | ||
</Security> | ||
</Configurations> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+508 KB
tutorial84/test/fad4f210-a7e6-435a-a1f9-9b3f29a800ad/index_metadata.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.