You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started using autogen. I have tried to implement to a simple code execution as shown in the code below:
chat_result = code_executor_agent.initiate_chat(
code_writer_agent,
message="Write Python code to create a Kafka consumer using kafka-python library and \
this will listen to the Kafka server that is already running onlocalhost:9092 and topic numbers, \
use utf-8 for decoding message value. If the number received is even then print the number ",
)
I have already a Kafka server running on the provided localhost which will produce numbers. my aim is to create a python consumer code which will list to this code. But even though the code generated by the code execution is correct it is not able to listen from the kafka server. It throws error such as:
>>>>>>>> EXECUTING CODE BLOCK (inferred language is python)...
code_executor_agent (to code_writer_agent):
exitcode: 124 (execution failed)
Code output:
Timeout
Then autogen goes to create a producer in the next step, but I already have a producer running. Can someone help me in figuring out the issue? Iam using LocalCommandLineCodeExecutor.
>>>>>>>> USING AUTO REPLY...
code_writer_agent (to code_executor_agent):
It seems that the Kafka consumer script is timing out, which often indicates that there are no messages being sent to the numbers topic or that the Kafka broker may not be accessible.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
I have started using autogen. I have tried to implement to a simple code execution as shown in the code below:
I have already a Kafka server running on the provided localhost which will produce numbers. my aim is to create a python consumer code which will list to this code. But even though the code generated by the code execution is correct it is not able to listen from the kafka server. It throws error such as:
Then autogen goes to create a producer in the next step, but I already have a producer running. Can someone help me in figuring out the issue? Iam using LocalCommandLineCodeExecutor.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions