diff --git a/README.md b/README.md index 9bfa0d19..2821e860 100644 --- a/README.md +++ b/README.md @@ -259,18 +259,22 @@ from ai21 import AI21Client client = AI21Client() run_result = client.beta.maestro.runs.create_and_poll( - input="Write a poem about the ocean", + input="Tell me about AI21 Maestro", requirements=[ { "name": "length requirement", - "description": "The length of the poem should be less than 1000 characters", + "description": "The length of the response should be less than 2000 characters", }, { - "name": "rhyme requirement", - "description": "The poem should rhyme", + "name": "source requirement", + "description": ( + "Should rely on information from these websites: " + "https://www.ai21.com/, https://www.ai21.com/maestro/, " + "https://docs.ai21.com/home" + ), }, ], - include=["requirements_result"] + include=["requirements_result"] # Include additional fields in the result ) ``` diff --git a/examples/studio/maestro/async_run.py b/examples/studio/maestro/async_run.py index b3b634c7..ca029fab 100644 --- a/examples/studio/maestro/async_run.py +++ b/examples/studio/maestro/async_run.py @@ -8,21 +8,24 @@ async def main(): try: run_result = await client.beta.maestro.runs.create_and_poll( - input="Write a poem about the ocean", + input="Tell me about AI21 Maestro", requirements=[ { "name": "length requirement", - "description": "The length of the poem should be less than 1000 characters", + "description": "The length of the response should be less than 2000 characters", }, { - "name": "rhyme requirement", - "description": "The poem should rhyme", + "name": "source requirement", + "description": ( + "Should rely on information from these websites: " + "https://www.ai21.com/, https://www.ai21.com/maestro/, " + "https://docs.ai21.com/home" + ), }, ], include=["requirements_result"], ) - - print(run_result) + print(run_result.result) except TimeoutError: print("The run timed out") diff --git a/examples/studio/maestro/run.py b/examples/studio/maestro/run.py index b32258e4..8d20adad 100644 --- a/examples/studio/maestro/run.py +++ b/examples/studio/maestro/run.py @@ -6,20 +6,23 @@ def main(): try: run_result = client.beta.maestro.runs.create_and_poll( - input="Write a poem about the ocean", + input="Tell me about AI21 Maestro", requirements=[ { "name": "length requirement", - "description": "The length of the poem should be less than 1000 characters", + "description": "The length of the response should be less than 2000 characters", }, { - "name": "rhyme requirement", - "description": "The poem should rhyme", + "name": "source requirement", + "description": ( + "Should rely on information from these websites: " + "https://www.ai21.com/, https://www.ai21.com/maestro/, " + "https://docs.ai21.com/home" + ), }, ], include=["requirements_result"], ) - print(run_result) except TimeoutError: print("The run timed out") diff --git a/tests/integration_tests/clients/test_studio.py b/tests/integration_tests/clients/test_studio.py index 6c7efd82..35986305 100644 --- a/tests/integration_tests/clients/test_studio.py +++ b/tests/integration_tests/clients/test_studio.py @@ -50,8 +50,6 @@ def test_studio(test_file_name: str): argvalues=[ ("chat/async_chat_completions.py",), ("chat/async_stream_chat_completions.py",), - ("conversational_rag/conversational_rag.py",), - ("conversational_rag/async_conversational_rag.py",), ("maestro/run.py",), ("maestro/async_run.py",), ("agents/agent_crud.py",), @@ -61,8 +59,6 @@ def test_studio(test_file_name: str): ids=[ "when_chat_completions__should_return_ok", "when_stream_chat_completions__should_return_ok", - "when_conversational_rag__should_return_ok", - "when_async_conversational_rag__should_return_ok", "when_maestro_runs__should_return_ok", "when_maestro_async_runs__should_return_ok", "when_agent_crud__should_return_ok",