ws-bom-robot-app 0.0.97__tar.gz → 0.0.98__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {ws_bom_robot_app-0.0.97/ws_bom_robot_app.egg-info → ws_bom_robot_app-0.0.98}/PKG-INFO +1 -1
  2. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/setup.py +1 -1
  3. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/agent_lcel.py +3 -16
  4. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/main.py +0 -1
  5. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/models/api.py +0 -2
  6. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/providers/llm_manager.py +2 -7
  7. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98/ws_bom_robot_app.egg-info}/PKG-INFO +1 -1
  8. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/MANIFEST.in +0 -0
  9. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/README.md +0 -0
  10. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/pyproject.toml +0 -0
  11. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/requirements.txt +0 -0
  12. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/setup.cfg +0 -0
  13. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/__init__.py +0 -0
  14. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/auth.py +0 -0
  15. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/config.py +0 -0
  16. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/cron_manager.py +0 -0
  17. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/__init__.py +0 -0
  18. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/agent_context.py +0 -0
  19. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/agent_description.py +0 -0
  20. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/agent_handler.py +0 -0
  21. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/api.py +0 -0
  22. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
  23. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/evaluator.py +0 -0
  24. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/feedbacks/__init__.py +0 -0
  25. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/feedbacks/feedback_manager.py +0 -0
  26. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/models/__init__.py +0 -0
  27. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/models/base.py +0 -0
  28. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/models/feedback.py +0 -0
  29. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/models/kb.py +0 -0
  30. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/nebuly_handler.py +0 -0
  31. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/providers/__init__.py +0 -0
  32. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
  33. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
  34. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
  35. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
  36. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/tool_manager.py +0 -0
  37. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/tools/utils.py +0 -0
  38. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
  39. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/agent.py +0 -0
  40. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/chunker.py +0 -0
  41. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/cleanup.py +0 -0
  42. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/cms.py +0 -0
  43. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/download.py +0 -0
  44. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/print.py +0 -0
  45. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/secrets.py +0 -0
  46. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
  47. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
  48. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/__init__.py +0 -0
  49. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/base.py +0 -0
  50. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/chroma.py +0 -0
  51. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/faiss.py +0 -0
  52. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/manager.py +0 -0
  53. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/db/qdrant.py +0 -0
  54. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
  55. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
  56. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/api.py +0 -0
  57. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/azure.py +0 -0
  58. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -0
  59. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/confluence.py +0 -0
  60. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/dropbox.py +0 -0
  61. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/gcs.py +0 -0
  62. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/github.py +0 -0
  63. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/googledrive.py +0 -0
  64. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/jira.py +0 -0
  65. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
  66. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/s3.py +0 -0
  67. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/sftp.py +0 -0
  68. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/sharepoint.py +0 -0
  69. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/shopify.py +0 -0
  70. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
  71. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/slack.py +0 -0
  72. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/integration/thron.py +0 -0
  73. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
  74. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
  75. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/loader/docling.py +0 -0
  76. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
  77. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/main.py +0 -0
  78. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/subprocess_runner.py +0 -0
  79. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/task_manager.py +0 -0
  80. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app/util.py +0 -0
  81. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app.egg-info/SOURCES.txt +0 -0
  82. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
  83. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app.egg-info/requires.txt +0 -0
  84. {ws_bom_robot_app-0.0.97 → ws_bom_robot_app-0.0.98}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.97
3
+ Version: 0.0.98
4
4
  Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
5
  Home-page: https://github.com/websolutespa/bom
6
6
  Author: Websolute Spa
@@ -4,7 +4,7 @@ _requirements = [line.split('#')[0].strip() for line in open("requirements.txt")
4
4
 
5
5
  setup(
6
6
  name="ws_bom_robot_app",
7
- version="0.0.97",
7
+ version="0.0.98",
8
8
  description="A FastAPI application serving ws bom/robot/llm platform ai.",
9
9
  long_description=open("README.md", encoding='utf-8').read(),
10
10
  long_description_content_type="text/markdown",
@@ -1,4 +1,4 @@
1
- from typing import Any, Optional, Literal
1
+ from typing import Any, Optional
2
2
  from langchain.agents import AgentExecutor, create_tool_calling_agent
3
3
  from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
4
4
  from langchain_core.runnables import RunnableLambda
@@ -12,10 +12,8 @@ from ws_bom_robot_app.llm.defaut_prompt import default_prompt, tool_prompt
12
12
 
13
13
  class AgentLcel:
14
14
 
15
- def __init__(self, llm: LlmInterface, sys_message: str, sys_context: AgentContext, tools: list, ouput_model: str | dict = None, rules: LlmRules = None):
15
+ def __init__(self, llm: LlmInterface, sys_message: str, sys_context: AgentContext, tools: list, rules: LlmRules = None):
16
16
  self.sys_message = chevron.render(template=sys_message,data=sys_context)
17
- self.ouput_model = ouput_model
18
- self.output_parser = None
19
17
  self.__llm = llm
20
18
  self.__tools = tools
21
19
  self.rules = rules
@@ -29,10 +27,6 @@ class AgentLcel:
29
27
  message : LlmMessage = input[self.memory_key][-1]
30
28
  rules_prompt = await get_rules(self.embeddings, self.rules, message.content) if self.rules else ""
31
29
  system = default_prompt + (tool_prompt(render_text_description(self.__tools)) if len(self.__tools)>0 else "") + self.sys_message + rules_prompt
32
- if isinstance(self.ouput_model, dict):
33
- output_parser = self.__llm.get_parser(type="json", model=self.ouput_model)
34
- system += "\n\nFormat instructions:\n{format_instructions}".strip()
35
-
36
30
  prompt = ChatPromptTemplate(
37
31
  messages=[
38
32
  SystemMessage(content=system), #from ("system",system) to avoid improper f-string substitutions
@@ -41,13 +35,6 @@ class AgentLcel:
41
35
  ],
42
36
  template_format=None,
43
37
  )
44
- if output_parser:
45
- prompt.partial(
46
- format_instructions=output_parser.get_format_instructions()
47
- )
48
- self.output_parser = output_parser
49
- else:
50
- self.output_parser = self.__llm.get_parser(type="text")
51
38
  return prompt
52
39
 
53
40
  def __create_agent(self) -> AgentExecutor:
@@ -58,6 +45,6 @@ class AgentLcel:
58
45
  }
59
46
  | RunnableLambda(self.__create_prompt)
60
47
  | self.__llm_with_tools
61
- | self.__llm.get_parser("text", None if not self.output_parser else "json", self.ouput_model)
48
+ | self.__llm.get_parser()
62
49
  )
63
50
  return AgentExecutor(agent=agent,tools=self.__tools,verbose=False)
@@ -127,7 +127,6 @@ async def __stream(rq: StreamRequest, ctx: Request, queue: Queue, formatted: boo
127
127
  sys_message=rq.system_message,
128
128
  sys_context=rq.system_context,
129
129
  tools=get_structured_tools(__llm, tools=rq.app_tools, callbacks=[callbacks], queue=queue),
130
- ouput_model=rq.jsonOutputModel,
131
130
  rules=rq.rules
132
131
  )
133
132
  try:
@@ -150,8 +150,6 @@ class LlmApp(BaseModel):
150
150
  app_tools: Optional[List[LlmAppTool]] = Field([], validation_alias=AliasChoices("appTools","app_tools"))
151
151
  vector_type: Optional[str] = "faiss"
152
152
  vector_db: Optional[str] = Field(None, validation_alias=AliasChoices("vectorDb","vector_db"))
153
- output_model: Optional[str] = Field(None, validation_alias=AliasChoices("outputModel","output_model"))
154
- jsonOutputModel: Optional[dict] = Field(None, validation_alias=AliasChoices("jsonOutputModel","json_output_model"))
155
153
  rules: Optional[LlmRules] = None
156
154
  fine_tuned_model: Optional[str] = Field(None, validation_alias=AliasChoices("fineTunedModel","fine_tuned_model"))
157
155
  lang_chain_tracing: Optional[bool] = Field(False, validation_alias=AliasChoices("langChainTracing","lang_chain_tracing"))
@@ -1,4 +1,4 @@
1
- from typing import Optional, Literal
1
+ from typing import Optional
2
2
  from urllib.parse import urlparse
3
3
  from langchain_core.embeddings import Embeddings
4
4
  from langchain_core.language_models import BaseChatModel
@@ -34,14 +34,9 @@ class LlmInterface:
34
34
  from langchain.agents.format_scratchpad.openai_tools import format_to_openai_tool_messages
35
35
  return format_to_openai_tool_messages(intermediate_steps=intermadiate_steps)
36
36
 
37
- def get_parser(self, type: Literal["text", "json"] = "text", model: Optional[dict] = None):
37
+ def get_parser(self):
38
38
  from langchain.agents.output_parsers.openai_tools import OpenAIToolsAgentOutputParser
39
- from langchain_core.output_parsers import JsonOutputParser
40
- from pydantic import create_model
41
- if type == "json":
42
- return JsonOutputParser(pydantic_object=create_model('json_schema', **{k: (type(v), ...) for k, v in model.items()}))
43
39
  return OpenAIToolsAgentOutputParser()
44
-
45
40
  async def _format_multimodal_image_message(self, message: dict) -> dict:
46
41
  return {
47
42
  "type": "image_url",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.97
3
+ Version: 0.0.98
4
4
  Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
5
  Home-page: https://github.com/websolutespa/bom
6
6
  Author: Websolute Spa