How to dynamic change assistant's prompt in a single round?

For example, I want the assistant to use prompt_A to analyze the user’s words, and then integrate the result from prompt_A with prompt_B to respond to the user.

essentially, the prompt_a ia a analyzer, the prompt_b is the response prompt.

Does the current assistant architecture support this design? Thank you

1 Like

Possible.

  1. create thread
  2. add message with user word
  3. create run with prompt A
  4. when run is completed, get result
  5. add result as new message
  6. create new run with prompt B

Or use function calling for prompt A, if you want to make isolated analysis and just send back result for prompt B

  1. create thread
  2. add message with user word
  3. create run with prompt B but with function calling
  4. function calling triggered, process user word with prompt A
  5. get result and submit output to main run
1 Like