Skip to content

Implement TextGrad Feature #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Implement TextGrad Feature #4

wants to merge 33 commits into from

Conversation

R-ohit-B-isht
Copy link
Owner

Implementation of TextGrad

This pull request includes the integration of the TextGrad framework into the OpenAdapt project. The changes involve the addition of TextGrad's prompt optimization functionality within the DemoReplayStrategy class in the demo.py file. The integration aims to enhance synthetic input generation and task tree analysis by utilizing TextGrad's automatic differentiation through text with feedback from large language models (LLMs).

The following key changes were made:

  • Imported TextGrad and necessary components.
  • Initialized TextGrad components and set up the system prompt as a variable for optimization.
  • Created an optimization loop to refine the prompt based on a loss function.
  • Added methods for validating the performance of the prompt and reverting to a previous prompt if performance decreases.

Please review the changes and provide feedback.

R-ohit-B-isht pushed a commit that referenced this pull request Jun 21, 2024
…AdaptAI#409)

* fix: git reinstallation even if it si present

* fix: Error Message:

Remove-Item : Cannot remove the item at 'C:\Users\Krish Patel\hi' because it is in
use.
At line:1 char:9
+         Remove-Item -LiteralPath $setupdir -Force -Recurse
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Remove-Item], PSInvalidOperation
   Exception
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RemoveIt
   emCommand

* fix: issue that poetry shell gives
"..runnning scripts is disabled on the command line"

* fix: bug #4 issue
 to support multiple version of python (acc. to OpenAdapt standards)

* add start mesage to know
 why sometimes the installtion command exits

* fix the edge case where the new terminal PWD
 is not set to the OpenAdapt folder that was installed

* Update install/install_openadapt.ps1

---------

Co-authored-by: Richard Abrich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant