diff --git a/docs/source/en/reference/models.md b/docs/source/en/reference/models.md index 3258a86..559b0b5 100644 --- a/docs/source/en/reference/models.md +++ b/docs/source/en/reference/models.md @@ -114,6 +114,7 @@ print(model(messages)) This class lets you call any OpenAIServer compatible model. Here's how you can set it (you can customise the `api_base` url to point to another server): ```py +import os from smolagents import OpenAIServerModel model = OpenAIServerModel( diff --git a/docs/source/en/tutorials/building_good_agents.md b/docs/source/en/tutorials/building_good_agents.md index bc51656..a97e8f2 100644 --- a/docs/source/en/tutorials/building_good_agents.md +++ b/docs/source/en/tutorials/building_good_agents.md @@ -194,7 +194,7 @@ If above clarifications are not sufficient, you can change the system prompt. Let's see how it works. For example, let us check the default system prompt for the [`CodeAgent`] (below version is shortened by skipping zero-shot examples). ```python -print(agent.system_prompt_template) +print(agent.prompt_templates["system_prompt"]) ``` Here is what you get: ```text diff --git a/docs/source/hi/reference/agents.md b/docs/source/hi/reference/agents.md index 11b461e..d49ecae 100644 --- a/docs/source/hi/reference/agents.md +++ b/docs/source/hi/reference/agents.md @@ -146,6 +146,7 @@ print(model(messages)) यह क्लास आपको किसी भी OpenAIServer कम्पैटिबल मॉडल को कॉल करने देती है। यहाँ बताया गया है कि आप इसे कैसे सेट कर सकते हैं (आप दूसरे सर्वर को पॉइंट करने के लिए `api_base` url को कस्टमाइज़ कर सकते हैं): ```py +import os from smolagents import OpenAIServerModel model = OpenAIServerModel( diff --git a/docs/source/hi/tutorials/building_good_agents.md b/docs/source/hi/tutorials/building_good_agents.md index 86eee27..1f93273 100644 --- a/docs/source/hi/tutorials/building_good_agents.md +++ b/docs/source/hi/tutorials/building_good_agents.md @@ -195,7 +195,7 @@ Final answer: आइए देखें कि यह कैसे काम करता है। उदाहरण के लिए, आइए [`CodeAgent`] के लिए डिफ़ॉल्ट सिस्टम प्रॉम्प्ट की जाँच करें (नीचे दिया गया वर्जन जीरो-शॉट उदाहरणों को छोड़कर छोटा किया गया है)। ```python -print(agent.system_prompt_template) +print(agent.prompt_templates["system_prompt"]) ``` Here is what you get: ```text diff --git a/docs/source/zh/tutorials/building_good_agents.md b/docs/source/zh/tutorials/building_good_agents.md index 47cd202..641e0a2 100644 --- a/docs/source/zh/tutorials/building_good_agents.md +++ b/docs/source/zh/tutorials/building_good_agents.md @@ -193,7 +193,7 @@ Final answer: 让我们看看它是如何工作的。例如,让我们检查 [`CodeAgent`] 的默认系统提示(下面的版本通过跳过零样本示例进行了缩短)。 ```python -print(agent.system_prompt_template) +print(agent.prompt_templates["system_prompt"]) ``` 你会得到: ```text diff --git a/src/smolagents/e2b_executor.py b/src/smolagents/e2b_executor.py index ca899ee..10b0170 100644 --- a/src/smolagents/e2b_executor.py +++ b/src/smolagents/e2b_executor.py @@ -45,7 +45,7 @@ class E2BExecutor: raise ModuleNotFoundError( """Please install 'e2b' extra to use E2BExecutor: `pip install "smolagents[e2b]"`""" ) - + self.logger = logger self.logger.log("Initializing E2B executor, hold on...") self.custom_tools = {}