Skip to content

Commit

Permalink
Revert name change
Browse files Browse the repository at this point in the history
Signed-off-by: JonahSussman <[email protected]>
  • Loading branch information
JonahSussman committed Jan 10, 2025
1 parent cb64002 commit f603b9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/initialize.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ log_level = "INFO"
file_log_level = "DEBUG"
log_dir_path = "./logs"

[models]
[model_provider]
provider = "ChatIBMGenAI"

[models.args]
Expand Down
2 changes: 1 addition & 1 deletion kai/reactive_codeplanner/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def main() -> None:

logging.init_logging_from_log_config(kai_config.log_config)

model_provider = ModelProvider(kai_config.models)
model_provider = ModelProvider(kai_config.model_provider)

analyzer = AnalyzerLSP(
analyzer_lsp_server_binary=Path(args.analyzer_lsp_server_binary),
Expand Down
4 changes: 2 additions & 2 deletions kai/rpc_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class KaiRpcApplicationConfig(CamelCaseBaseModel):
process_id: Optional[int] = None

root_path: AutoAbsPath
models: KaiConfigModels
model_provider: KaiConfigModels

log_config: KaiLogConfig

Expand Down Expand Up @@ -176,7 +176,7 @@ def initialize(

try:
model_provider = ModelProvider(
app.config.models, app.config.demo_mode, app.config.cache_dir
app.config.model_provider, app.config.demo_mode, app.config.cache_dir
)
except Exception as e:
app.log.error("unable to get model provider:", e)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_logger_has_default(self) -> None:

self.assertEqual(log.getEffectiveLevel(), logging.NOTSET)
self.assertTrue(isinstance(log, KaiLogger))
self.assertEqual(log.config_log_level, logging.NOTSET)
self.assertEqual(log.configLogLevel, logging.NOTSET)
self.assertEqual(base_logger.filters, log.filters)
self.assertEqual(base_logger.handlers, log.handlers)

Expand Down Expand Up @@ -65,11 +65,11 @@ def test_logger_init_updates_logs(self) -> None:

self.assertTrue(isinstance(test_first_log, KaiLogger))
self.assertEqual(test_first_log.level, logging.NOTSET)
self.assertEqual(test_first_log.config_log_level, base_logger.level)
self.assertEqual(test_first_log.configLogLevel, base_logger.level)
self.assertEqual(len(test_first_log.filters), 0)
self.assertEqual(len(test_first_log.handlers), 0)
self.assertTrue(isinstance(test_second_log, KaiLogger))
self.assertEqual(test_second_log.level, logging.NOTSET)
self.assertEqual(test_second_log.config_log_level, base_logger.level)
self.assertEqual(test_second_log.configLogLevel, base_logger.level)
self.assertEqual(len(test_second_log.filters), 0)
self.assertEqual(len(test_second_log.handlers), 0)

0 comments on commit f603b9d

Please sign in to comment.