You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using the previous version of guidance pretty extensively in our app, and I'm finding it difficult to understand how to migrate from the handlebars version to the latest one.
The previous docs for example, had this implementation of an agent:
prompt = guidance(
'''{{#system~}}
You are a helpful assistant
{{/system}}
{{#geneach 'conversation'}}
{{#user~}}
{{set 'this.user_text' (await 'user_text')}}
{{/user}}
{{#assistant}}
{{gen 'this.ai_text' temperature=0 max_tokens=300}}
{{/assistant}}
{{/geneach}}''')
prompt= prompt(user_text ='hi there')
prompt
Also from the docs "you can combine the await tag with geneach (which generates a list) to create an agent easily ..."
We're using both of these previous functionalities pretty extensively, but I'm having trouble understanding how to adjust existing code to achieve the same functionality with the new version.
Another question I have is whether this new version supports the latest openai API version.
Please provide a migration guide and a 1:1 port over of examples provided previously, especially related to geneach and await.
This will help people using guidance to upgrade easily. Currently, I'm using a pretty old version of guidance becaue it does not appear to work with openai updates and the python implementation versus handlebars isn't really explained well.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi.
We're using the previous version of guidance pretty extensively in our app, and I'm finding it difficult to understand how to migrate from the handlebars version to the latest one.
The previous docs for example, had this implementation of an agent:
prompt = guidance(
'''{{#system~}}
You are a helpful assistant
{{
/system}}#geneach 'conversation'}}{{
{{#user~}}
{{set 'this.user_text' (await 'user_text')}}
{{
/user}}}}{{#assistant
{{gen 'this.ai_text' temperature=0 max_tokens=300}}
{{
/assistant}}/geneach}}'''){{
prompt= prompt(user_text ='hi there')
prompt
Also from the docs "you can combine the await tag with geneach (which generates a list) to create an agent easily ..."
We're using both of these previous functionalities pretty extensively, but I'm having trouble understanding how to adjust existing code to achieve the same functionality with the new version.
Another question I have is whether this new version supports the latest openai API version.
Please provide a migration guide and a 1:1 port over of examples provided previously, especially related to geneach and await.
This will help people using guidance to upgrade easily. Currently, I'm using a pretty old version of guidance becaue it does not appear to work with openai updates and the python implementation versus handlebars isn't really explained well.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions