AI agents team, research report

This commit is contained in:
ajaysi
2024-05-08 10:06:08 +05:30
parent 6f88f9ba34
commit f9b9204349
4 changed files with 17 additions and 25 deletions

View File

@@ -155,7 +155,6 @@ def ai_story_generator(persona, story_genre, characters):
try:
starting_draft = generate_with_retry(model,
starting_prompt.format(premise=premise, outline=outline)).text
pprint(starting_draft)
except Exception as err:
print(f"Failed to Generate Story draft: {err}")
return
@@ -164,7 +163,6 @@ def ai_story_generator(persona, story_genre, characters):
draft = starting_draft
continuation = generate_with_retry(model,
continuation_prompt.format(premise=premise, outline=outline, story_text=draft)).text
pprint(continuation)
except Exception as err:
print(f"Failed to write the initial draft: {err}")
@@ -184,7 +182,7 @@ def ai_story_generator(persona, story_genre, characters):
# Remove 'IAMDONE' and print the final story
final = draft.replace('IAMDONE', '').strip()
pprint(final)
print(final)
except Exception as e:
print(f"Main Story writing: An error occurred: {e}")