Add Feature to Existing Script or Code Class

Introduces a new functionality to a code snippet.

Input

Enhance an existing script or code class by adding a new feature or functionality. Provide the current code and describe the desired feature, and this task will deliver a modified version with the requested improvements.

[1.0.1]:
Improve prompt
[1.0.0]:
First Version
VersionAI ModelCreatedLink
1.0.125.04.2023
1.0.023.04.2023

API

The REST API allows you to call the tool with the same costs as when running the tool. Please generate an Personal access token before using the REST API.

Parameters

  • source (Source Code): The source could that should be extended
  • feature (Feature): The feature that should be added
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/u-ba835df8268fc301-add-feature-to-existing-script-or-code-class/1.0.1?source=print('Hello%20world!')%3B&feature=short%20description%20of%20what%20feature%20should%20be%20added%20to%20the%20code
  • Install the package with pip
    python3 -m pip install anysolve
  • Run in python3
    import os
    from anysolve import AnySolve
    anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
    client = AnySolve(anysolve_token)
    res = client.run('u-ba835df8268fc301-add-feature-to-existing-script-or-code-class','1.0.1', {'source': 'print(\'Hello world!\');', 'feature': 'short description of what feature should be added to the code'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('u-ba835df8268fc301-add-feature-to-existing-script-or-code-class','1.0.1', source='print(\'Hello world!\');', feature='short description of what feature should be added to the code')