Closed abhi-vachani closed 6 days ago
@abhi-vachani
Traceback (most recent call last):
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/bin/server.py", line 172, in start_os
machine: AgentMachine = machine_spec.instantiate()
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 263, in instantiate
return self._get_reference_class()(*args, **kwargs)
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/agent_machine.py", line 65, in __init__
for name, r in AgentOSKernel.get_resources(AgentResource).items():
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/kernel.py", line 73, in get_resources
register_resource_promote_error(k, kind.__name__, e, tu[1])
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/resource_load_error_handler.py", line 61, in register_resource_promote_error
raise e
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/kernel.py", line 71, in get_resources
ret[k] = tu[0].promote(kind)
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/resources/resources_base.py", line 32, in promote
return clazz.model_validate(self.model_dump())
File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate
return cls.__pydantic_validator__.validate_python(
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate
spec.model_validate(self.model_extra or {})
File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate
return cls.__pydantic_validator__.validate_python(
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate
spec.model_validate(self.model_extra or {})
File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate
return cls.__pydantic_validator__.validate_python(
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate
spec.model_validate(self.model_extra or {})
File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate
return cls.__pydantic_validator__.validate_python(
File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/builtins/logic_units/toolhouse_logic_unit.py", line 12, in <lambda>
api_key: str = Field(default_factory=lambda:os.environ['TOOLHOUSE_API_KEY'])
File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/os.py", line 680, in __getitem__
raise KeyError(key) from None
KeyError: 'TOOLHOUSE_API_KEY'
on the top of your test file, you should add a default TOOLHOUSE_API_KEY
envar if it is not otherwise set
ie
os.environ.setdefault("TOOLHOUSE_API_KEY", "test")
you can see an example of this that I had to do for vectara: https://github.com/eidolon-ai/eidolon/blob/42cc7bee330ca97ba22ea0663df922623fd18a52/sdk/tests/test_vectara_agent.py
@abhi-vachani
Traceback (most recent call last): File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/bin/server.py", line 172, in start_os machine: AgentMachine = machine_spec.instantiate() File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 263, in instantiate return self._get_reference_class()(*args, **kwargs) File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/agent_machine.py", line 65, in __init__ for name, r in AgentOSKernel.get_resources(AgentResource).items(): File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/kernel.py", line 73, in get_resources register_resource_promote_error(k, kind.__name__, e, tu[1]) File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/resource_load_error_handler.py", line 61, in register_resource_promote_error raise e File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/kernel.py", line 71, in get_resources ret[k] = tu[0].promote(kind) File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/resources/resources_base.py", line 32, in promote return clazz.model_validate(self.model_dump()) File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate return cls.__pydantic_validator__.validate_python( File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate spec.model_validate(self.model_extra or {}) File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate return cls.__pydantic_validator__.validate_python( File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate spec.model_validate(self.model_extra or {}) File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate return cls.__pydantic_validator__.validate_python( File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/system/reference_model.py", line 221, in _validate spec.model_validate(self.model_extra or {}) File "/home/runner/.cache/pypoetry/virtualenvs/eidolon-ai-sdk-0FKF9En--py3.10/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate return cls.__pydantic_validator__.validate_python( File "/home/runner/work/eidolon/eidolon/sdk/eidolon_ai_sdk/builtins/logic_units/toolhouse_logic_unit.py", line 12, in <lambda> api_key: str = Field(default_factory=lambda:os.environ['TOOLHOUSE_API_KEY']) File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/os.py", line 680, in __getitem__ raise KeyError(key) from None KeyError: 'TOOLHOUSE_API_KEY'
on the top of your test file, you should add a default
TOOLHOUSE_API_KEY
envar if it is not otherwise setie
os.environ.setdefault("TOOLHOUSE_API_KEY", "test")
you can see an example of this that I had to do for vectara: https://github.com/eidolon-ai/eidolon/blob/42cc7bee330ca97ba22ea0663df922623fd18a52/sdk/tests/test_vectara_agent.py
Makes sense, just set it -- thanks.
Toolhouse tools running now :) Seems like a few configuration/other files have showed up, just want to make sure nothing looks off with those?