agenerate • AI Agent SDK

agenerate: Generate code asynchronously.

agenerate

Async

Method

</div>

This is a method of the CodeAgent class in the code_agent module.

Generate code asynchronously.

Signature

python
async def agenerate(prompt: str, language: str) -> str

Parameters

ParamField str

Natural language description

ParamField str

Target programming language **kwargs: Additional arguments

Returns

ResponseField str

Generated code as string

Uses

  • acompletion
  • ValueError

Used By

Source

View on GitHub

praisonaiagents/agent/code_agent.py at line 180