ziya 0.1.22__tar.gz → 0.1.24__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.

Potentially problematic release.


This version of ziya might be problematic. Click here for more details.

Files changed (38) hide show
  1. {ziya-0.1.22 → ziya-0.1.24}/PKG-INFO +2 -2
  2. {ziya-0.1.22 → ziya-0.1.24}/README.md +1 -1
  3. {ziya-0.1.22 → ziya-0.1.24}/app/agents/agent.py +1 -38
  4. ziya-0.1.24/app/agents/prompts.py +37 -0
  5. {ziya-0.1.22 → ziya-0.1.24}/pyproject.toml +1 -1
  6. {ziya-0.1.22 → ziya-0.1.24}/templates/asset-manifest.json +6 -6
  7. {ziya-0.1.22 → ziya-0.1.24}/templates/index.html +1 -1
  8. ziya-0.1.22/templates/static/css/main.987be07e.css → ziya-0.1.24/templates/static/css/main.36c086ff.css +2 -2
  9. ziya-0.1.24/templates/static/css/main.36c086ff.css.map +1 -0
  10. ziya-0.1.24/templates/static/js/main.3967f091.js +3 -0
  11. ziya-0.1.22/templates/static/js/main.e5e64dae.js.LICENSE.txt → ziya-0.1.24/templates/static/js/main.3967f091.js.LICENSE.txt +6 -0
  12. ziya-0.1.24/templates/static/js/main.3967f091.js.map +1 -0
  13. ziya-0.1.22/app/agents/prompts.py +0 -49
  14. ziya-0.1.22/templates/static/css/main.987be07e.css.map +0 -1
  15. ziya-0.1.22/templates/static/js/main.e5e64dae.js +0 -3
  16. ziya-0.1.22/templates/static/js/main.e5e64dae.js.map +0 -1
  17. {ziya-0.1.22 → ziya-0.1.24}/LICENSE +0 -0
  18. {ziya-0.1.22 → ziya-0.1.24}/app/__init__.py +0 -0
  19. {ziya-0.1.22 → ziya-0.1.24}/app/agents/__init__.py +0 -0
  20. {ziya-0.1.22 → ziya-0.1.24}/app/main.py +0 -0
  21. {ziya-0.1.22 → ziya-0.1.24}/app/server.py +0 -0
  22. {ziya-0.1.22 → ziya-0.1.24}/app/utils/__init__.py +0 -0
  23. {ziya-0.1.22 → ziya-0.1.24}/app/utils/directory_util.py +0 -0
  24. {ziya-0.1.22 → ziya-0.1.24}/app/utils/gitignore_parser.py +0 -0
  25. {ziya-0.1.22 → ziya-0.1.24}/app/utils/langchain_validation_util.py +0 -0
  26. {ziya-0.1.22 → ziya-0.1.24}/app/utils/logging_utils.py +0 -0
  27. {ziya-0.1.22 → ziya-0.1.24}/app/utils/print_tree_util.py +0 -0
  28. {ziya-0.1.22 → ziya-0.1.24}/app/utils/version_util.py +0 -0
  29. {ziya-0.1.22 → ziya-0.1.24}/scripts.py +0 -0
  30. {ziya-0.1.22 → ziya-0.1.24}/templates/favicon.ico +0 -0
  31. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-brands-400.455ea818179b4def0c43.woff2 +0 -0
  32. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-brands-400.60127e352b7a11f7f1bc.ttf +0 -0
  33. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-regular-400.21cb8f55d8e0c5b89751.woff2 +0 -0
  34. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-regular-400.eb91f7b948a42799f678.ttf +0 -0
  35. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-solid-900.4d986b00ff9ca3828fbd.woff2 +0 -0
  36. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-solid-900.bacd5de623fb563b961a.ttf +0 -0
  37. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-v4compatibility.c8e090db312b0bea2aa2.ttf +0 -0
  38. {ziya-0.1.22 → ziya-0.1.24}/templates/static/media/fa-v4compatibility.cf7f5903d06b79ad60f1.woff2 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ziya
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary:
5
5
  Author: Vishnu Krishnaprasad
6
6
  Author-email: vishnukool@gmail.com
@@ -87,6 +87,6 @@ ziya
87
87
  `--port`: The port number for frontend app. Default is `6969`.
88
88
 
89
89
  ```bash
90
- ziya --include='app,src/mappers' --exclude='tst,build,*.py' --profile=ziya --model=sonnet --port=8080
90
+ ziya --exclude='tst,build,*.py' --profile=ziya --model=sonnet --port=8080
91
91
  ```
92
92
 
@@ -62,5 +62,5 @@ ziya
62
62
  `--port`: The port number for frontend app. Default is `6969`.
63
63
 
64
64
  ```bash
65
- ziya --include='app,src/mappers' --exclude='tst,build,*.py' --profile=ziya --model=sonnet --port=8080
65
+ ziya --exclude='tst,build,*.py' --profile=ziya --model=sonnet --port=8080
66
66
  ```
@@ -67,47 +67,10 @@ def get_combined_docs_from_files(files) -> str:
67
67
  print("--------------------------------------------------------")
68
68
  return combined_contents
69
69
 
70
- # def get_combined_document_contents_from_included_dirs(included_relative_dirs) -> str:
71
- # user_codebase_dir: str = os.environ["ZIYA_USER_CODEBASE_DIR"]
72
- # print(f"Reading user's current codebase: {user_codebase_dir}")
73
- #
74
- # combined_contents: str = ""
75
- # ignored_patterns: List[str] = get_ignored_patterns(user_codebase_dir)
76
- # all_files: List[str] = get_complete_file_list(user_codebase_dir, ignored_patterns, included_relative_dirs)
77
- # print("all_files")
78
- # print(all_files)
79
- #
80
- # print_file_tree(all_files)
81
- #
82
- # seen_dirs: Set[str] = set()
83
- # for file_path in all_files:
84
- # try:
85
- # docs = TextLoader(file_path).load()
86
- # for doc in docs:
87
- # combined_contents += f"File: {file_path}\n{doc.page_content}\n\n"
88
- # dir_path = os.path.dirname(file_path)
89
- # if dir_path not in seen_dirs:
90
- # seen_dirs.add(dir_path)
91
- # except Exception as e:
92
- # print(f"Skipping file {file_path} due to error: {e}")
93
- #
94
- # print("--------------------------------------------------------")
95
- # print(f"Ignoring following paths based on gitIgnore and other defaults: {ignored_patterns}")
96
- # print("--------------------------------------------------------")
97
- # print(f"Codebase word count: {len(combined_contents.split()):,}")
98
- # token_count = len(tiktoken.get_encoding("cl100k_base").encode(combined_contents))
99
- # print(f"Codebase token count: {token_count:,}")
100
- # print(f"Max Claude Token limit: 200,000")
101
- # print("--------------------------------------------------------")
102
- # return combined_contents
103
-
104
- # prompt = conversational_prompt.partial(
105
- # # codebase=get_combined_document_contents()
106
- # )
70
+
107
71
  llm_with_stop = model.bind(stop=["</tool_input>"])
108
72
 
109
73
  def extract_codebase(x):
110
- # return get_combined_docs_from_files(x["config"].get("include_dirs", ['./']))
111
74
  return get_combined_docs_from_files(x["config"].get("files", []))
112
75
 
113
76
  agent = (
@@ -0,0 +1,37 @@
1
+ from langchain_core.agents import AgentFinish
2
+ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
3
+ # import pydevd_pycharm
4
+
5
+ template = """
6
+ You are an excellent coder. Help the user with their coding tasks. You are given the codebase
7
+ of the user in your context.
8
+
9
+ IMPORTANT: When recommending code changes, always format your response as a git diff unless the user specifies otherwise.
10
+
11
+ The codebase is provided at the end of this prompt in a specific format.
12
+ The code that the user has given to you for context is in the format like below where first line has the File path and then the content follows.
13
+ Each file starts with "File: <filepath>" followed by its content on subsequent lines.
14
+
15
+ File: <filepath>
16
+ <Content of the file>.
17
+
18
+ Below is the current codebase of the user:
19
+
20
+ {codebase}
21
+
22
+ """
23
+
24
+ conversational_prompt = ChatPromptTemplate.from_messages(
25
+ [
26
+ ("system", template),
27
+ # ("system", "You are a helpful AI bot. Your name is {name}."),
28
+ MessagesPlaceholder(variable_name="chat_history"),
29
+ ("user", "{question}"),
30
+ ("ai", "{agent_scratchpad}"),
31
+ ]
32
+ )
33
+
34
+
35
+ def parse_output(message):
36
+ text = message.content
37
+ return AgentFinish(return_values={"output": text}, log=text)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ziya"
3
- version = "0.1.22"
3
+ version = "0.1.24"
4
4
  description = ""
5
5
  authors = ["Vishnu Krishnaprasad <vishnukool@gmail.com>"]
6
6
  readme = "README.md"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
- "main.css": "/static/css/main.987be07e.css",
4
- "main.js": "/static/js/main.e5e64dae.js",
3
+ "main.css": "/static/css/main.36c086ff.css",
4
+ "main.js": "/static/js/main.3967f091.js",
5
5
  "static/media/fa-solid-900.ttf": "/static/media/fa-solid-900.bacd5de623fb563b961a.ttf",
6
6
  "static/media/fa-brands-400.ttf": "/static/media/fa-brands-400.60127e352b7a11f7f1bc.ttf",
7
7
  "static/media/fa-solid-900.woff2": "/static/media/fa-solid-900.4d986b00ff9ca3828fbd.woff2",
@@ -11,11 +11,11 @@
11
11
  "static/media/fa-v4compatibility.ttf": "/static/media/fa-v4compatibility.c8e090db312b0bea2aa2.ttf",
12
12
  "static/media/fa-v4compatibility.woff2": "/static/media/fa-v4compatibility.cf7f5903d06b79ad60f1.woff2",
13
13
  "index.html": "/index.html",
14
- "main.987be07e.css.map": "/static/css/main.987be07e.css.map",
15
- "main.e5e64dae.js.map": "/static/js/main.e5e64dae.js.map"
14
+ "main.36c086ff.css.map": "/static/css/main.36c086ff.css.map",
15
+ "main.3967f091.js.map": "/static/js/main.3967f091.js.map"
16
16
  },
17
17
  "entrypoints": [
18
- "static/css/main.987be07e.css",
19
- "static/js/main.e5e64dae.js"
18
+ "static/css/main.36c086ff.css",
19
+ "static/js/main.3967f091.js"
20
20
  ]
21
21
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Ziya - Code Assistant</title><link rel="icon" href="/favicon.ico" type="image/x-icon"><script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script><script defer="defer" src="/static/js/main.e5e64dae.js"></script><link href="/static/css/main.987be07e.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Ziya - Code Assistant</title><link rel="icon" href="/favicon.ico" type="image/x-icon"><script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script><script defer="defer" src="/static/js/main.3967f091.js"></script><link href="/static/css/main.36c086ff.css" rel="stylesheet"></head><body><div id="root"></div></body></html>