Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mandel
Copy link
Collaborator

@mandel mandel commented Jul 28, 2025

With this PR, the background context of the body of a function stays local to the function and only the result of the function is added to the context when it is called.

For example, in the following program:

defs:
  f:
    function:
    return:
      lastOf:
      - How are you?
      - Bye
lastOf:
- Hello
- call: ${f}
- ${pdl_context}

The output is

[ {'role': 'user', 'content': 'Hello'},
  {'role': 'user', 'content': 'Bye'} ]

Warning: inlining a function might change the background context.

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