Код: Выделить всё
import os
import autogen
from autogen import AssistantAgent, UserProxyAgent
os.environ["OPENAI_API_KEY"] = "dummy_key"
llm_config_local = {"config_list" : [{
"model": "gemma-2-2b-it-GGUF/gemma-2-2b-it-Q4_K_M.gguf",
"base_url": "http://localhost:1234/v1/completions",
"api_key": None,
"price": [0, 0]
}]}
assistant = AssistantAgent("assistant", llm_config=llm_config_local)
user_proxy = UserProxyAgent(
"user_proxy", code_execution_config={"executor":
autogen.coding.LocalCommandLineCodeExecutor(work_dir="coding")}
)
# Start the chat
user_proxy.initiate_chat(
assistant,
message="Plot a chart of NVDA and TESLA stock price change YTD.",
)
Подробнее здесь: https://stackoverflow.com/questions/790 ... t-iterable