You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we import the `PythonCodeEditor`, currently the only supported editor, along with a llama LLM. Notice that this assumes a server running on 0.0.0.0:8000, which comes from my other repo: https://github.com/paolorechia/learn-langchain/blob/main/servers/vicuna_server.py
68
+
69
+
You can easily change this to instead use the text-generation-web-ui tool from oobagooba, by importing the builder: `build_text_generation_web_ui_client_llm`. Implementing your own model client should also be straightforward. Look at the source code in: https://github.com/paolorechia/code-it/blob/main/code_it/models.py
70
+
71
+
### Modifying the behavior
72
+
Notice that in the example above we imported the `TaskExecutionConfig`, let's look at this class:
73
+
74
+
```python
75
+
@dataclass
76
+
classTaskExecutionConfig:
77
+
execute_code =True
78
+
install_dependencies =True
79
+
apply_linter =True
80
+
check_package_is_in_pypi =True
81
+
log_to_stdout =True
82
+
coding_samples =3
83
+
code_sampling_strategy ="PYLINT"
84
+
sampling_temperature_multipler =0.1
85
+
dependency_samples =3
86
+
max_coding_attempts =5
87
+
dependency_install_attempts =5
88
+
planner_temperature =0
89
+
coder_temperature =0
90
+
linter_temperature =0.3
91
+
dependency_tracker_temperature =0.2
92
+
```
93
+
94
+
You can change these parameters to change how the program behaves. Not all settings are always applied at the same time, for instance, if you change the `code_sampling_strategy` to `NO_SAMPLING`, then of course the config parameter `sampling_temperature_multiplier` is not used.
95
+
96
+
To understand these settings better, you should read the task execution code directly, as there is no detailed documentation for this yet: https://github.com/paolorechia/code-it/blob/main/code_it/task_executor.py
47
97
48
98
49
99
## Using it with Langchain
@@ -55,11 +105,7 @@ Change the task in the `task.txt` file to perform another task.
55
105
56
106
57
107
58
-
## Modifying the behavior
59
-
When you're importing `code_it` package in your own code, you can change some settings on how it should behave. Specifically, these are the supported config options at the moment:
0 commit comments