MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / to_dict

Method to_dict

codewiki/cli/models/config.py:160–179  ·  view source on GitHub ↗

Convert to dictionary.

(self)

Source from the content-addressed store, hash-verified

158 validate_model_name(self.main_model)
159 validate_model_name(self.cluster_model)
160 validate_model_name(self.fallback_model)
161
162 def to_dict(self) -> dict:
163 """Convert to dictionary."""
164 result = {
165 'base_url': self.base_url,
166 'main_model': self.main_model,
167 'cluster_model': self.cluster_model,
168 'default_output': self.default_output,
169 'provider': self.provider,
170 'aws_region': self.aws_region,
171 'api_version': self.api_version,
172 'azure_deployment': self.azure_deployment,
173 'max_tokens': self.max_tokens,
174 'max_token_per_module': self.max_token_per_module,
175 'max_token_per_leaf_module': self.max_token_per_leaf_module,
176 'max_depth': self.max_depth,
177 'use_gitignore': self.use_gitignore,
178 'fallback_model': self.fallback_model,
179 }
180 if self.agent_instructions and not self.agent_instructions.is_empty():
181 result['agent_instructions'] = self.agent_instructions.to_dict()
182 return result

Callers 3

saveMethod · 0.45
config_showFunction · 0.45
generate_commandFunction · 0.45

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected