Skip to content

Commit

Permalink
Update prompt index with new prompt data name (#714)
Browse files Browse the repository at this point in the history
Update prompt index with new prompt data name

Fixing issue from
#710 (comment)
  • Loading branch information
rholinshead authored Jan 2, 2024
2 parents dbd96d4 + b3b2e76 commit 811046e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/src/aiconfig/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@ def update_prompt(self, prompt_name: str, prompt_data: Prompt):
for i, prompt in enumerate(self.prompts):
if prompt.name == prompt_name:
self.prompts[i] = prompt_data
del self.prompt_index[prompt_name]
self.prompt_index[prompt_data.name] = prompt_data
break

def delete_prompt(self, prompt_name: str):
Expand Down

0 comments on commit 811046e

Please sign in to comment.