Skip to content

Agent won't write code to a file nor generate a python code that it will execute to write the code to the file. #4890

Answered by ekzhu
hackertron asked this question in Q&A
Discussion options

You must be logged in to vote

You might just need to prompt it a bit more. Though, writing code to a file is not much different than writing code on the fly?

I noticed you are using autogen package. We don't maintain this -- it is from a fork. Please use autogen-agentchat.

Also, v0.4 release just came out today. You can try the following to see if helps:

# pip install -U "autogen-agentchat" "autogen-ext[openai]" "yfinance" "matplotlib"
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.code_executors.local import LocalCommandLineCodeExecutor
from autogen_ext.tools.code_execution im…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hackertron
Comment options

@ekzhu
Comment options

Answer selected by hackertron
@hackertron
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants