Lumintroll commited on
Commit
e80aae1
·
1 Parent(s): 018a91d

Added html5lib

Browse files
__pycache__/agent_tools.cpython-310.pyc CHANGED
Binary files a/__pycache__/agent_tools.cpython-310.pyc and b/__pycache__/agent_tools.cpython-310.pyc differ
 
agent_tools.py CHANGED
@@ -171,9 +171,10 @@ model = AzureOpenAIServerModel(
171
  azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
172
  api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
173
  api_version=os.environ.get("OPENAI_API_VERSION"),
 
174
  max_tokens=4096
175
  )
176
 
177
- planning_steps = 4
178
 
179
  agent = CodeAgent(model=model, tools=tools, additional_authorized_imports=additionals, planning_interval=planning_steps)
 
171
  azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
172
  api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
173
  api_version=os.environ.get("OPENAI_API_VERSION"),
174
+ temperature=1.5,
175
  max_tokens=4096
176
  )
177
 
178
+ planning_steps = 1
179
 
180
  agent = CodeAgent(model=model, tools=tools, additional_authorized_imports=additionals, planning_interval=planning_steps)
app.py CHANGED
@@ -17,7 +17,7 @@ class BasicAgent:
17
  print("BasicAgent initialized.")
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")
20
- fixed_answer = self.agent.run(question + "\n\nEnsure any code is correctly formatted inside blobs. If you encounter an error in code parsing try passing just the code, paying careful attention to the blob wrapper. The final answer for chess or bird questions is N/A.")
21
  print(f"Agent returning fixed answer: {fixed_answer}")
22
  return fixed_answer
23
 
 
17
  print("BasicAgent initialized.")
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")
20
+ fixed_answer = self.agent.run(question + "\n\nThe final answer for chess or bird questions is N/A.")
21
  print(f"Agent returning fixed answer: {fixed_answer}")
22
  return fixed_answer
23
 
pyproject.toml CHANGED
@@ -25,4 +25,5 @@ dependencies = [
25
  "youtube-transcript-api>=1.0.3",
26
  "langchain>=0.3.25",
27
  "langchain-community>=0.3.24",
 
28
  ]
 
25
  "youtube-transcript-api>=1.0.3",
26
  "langchain>=0.3.25",
27
  "langchain-community>=0.3.24",
28
+ "html5lib>=1.1",
29
  ]
uv.lock CHANGED
@@ -37,6 +37,7 @@ dependencies = [
37
  { name = "google-genai" },
38
  { name = "gradio", extra = ["oauth"] },
39
  { name = "gradio-client" },
 
40
  { name = "huggingface-hub" },
41
  { name = "jupyter" },
42
  { name = "langchain" },
@@ -61,6 +62,7 @@ requires-dist = [
61
  { name = "google-genai", specifier = ">=1.16.1" },
62
  { name = "gradio", extras = ["oauth"], specifier = ">=5.31.0" },
63
  { name = "gradio-client", specifier = ">=1.10.1" },
 
64
  { name = "huggingface-hub", specifier = ">=0.32.0" },
65
  { name = "jupyter", specifier = ">=1.1.1" },
66
  { name = "langchain", specifier = ">=0.3.25" },
@@ -1097,6 +1099,19 @@ wheels = [
1097
  { url = "https://files.pythonhosted.org/packages/59/40/8f1d5a44a64d8bf9e3c19576e789f716af54875b46daae65426714e75db1/hf_xet-1.1.2-cp37-abi3-win_amd64.whl", hash = "sha256:3562902c81299b09f3582ddfb324400c6a901a2f3bc854f83556495755f4954c", size = 2739542 },
1098
  ]
1099
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1100
  [[package]]
1101
  name = "httpcore"
1102
  version = "1.0.9"
 
37
  { name = "google-genai" },
38
  { name = "gradio", extra = ["oauth"] },
39
  { name = "gradio-client" },
40
+ { name = "html5lib" },
41
  { name = "huggingface-hub" },
42
  { name = "jupyter" },
43
  { name = "langchain" },
 
62
  { name = "google-genai", specifier = ">=1.16.1" },
63
  { name = "gradio", extras = ["oauth"], specifier = ">=5.31.0" },
64
  { name = "gradio-client", specifier = ">=1.10.1" },
65
+ { name = "html5lib", specifier = ">=1.1" },
66
  { name = "huggingface-hub", specifier = ">=0.32.0" },
67
  { name = "jupyter", specifier = ">=1.1.1" },
68
  { name = "langchain", specifier = ">=0.3.25" },
 
1099
  { url = "https://files.pythonhosted.org/packages/59/40/8f1d5a44a64d8bf9e3c19576e789f716af54875b46daae65426714e75db1/hf_xet-1.1.2-cp37-abi3-win_amd64.whl", hash = "sha256:3562902c81299b09f3582ddfb324400c6a901a2f3bc854f83556495755f4954c", size = 2739542 },
1100
  ]
1101
 
1102
+ [[package]]
1103
+ name = "html5lib"
1104
+ version = "1.1"
1105
+ source = { registry = "https://pypi.org/simple" }
1106
+ dependencies = [
1107
+ { name = "six" },
1108
+ { name = "webencodings" },
1109
+ ]
1110
+ sdist = { url = "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f", size = 272215 }
1111
+ wheels = [
1112
+ { url = "https://files.pythonhosted.org/packages/6c/dd/a834df6482147d48e225a49515aabc28974ad5a4ca3215c18a882565b028/html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d", size = 112173 },
1113
+ ]
1114
+
1115
  [[package]]
1116
  name = "httpcore"
1117
  version = "1.0.9"