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
I am currently using your latitude-llm, and I find it very useful. However, I have a need to dynamically replace model parameters based on variables (e.g., switching model=gpt-4o to gpt-4o). I believe this logic would be well-suited for integration into the template engine. Additionally, support for syntax like {{if .model | contains "gpt"}} model is gpt model {{end}} would be incredibly helpful. I’d like to ask if there are any plans to support such functionality, as I think it would be a great feature to have.
The text was updated successfully, but these errors were encountered:
MMMartt
changed the title
Will custom handler (call function in template) be supported?
Feature Request: Dynamic Model Switching and Custom Function Handler
Dec 2, 2024
In the configuration section at the top of the document parameters are not currently allowed. However, you can use the step tag to add variable configurations. The step tag is originally used to define chains. However, a single prompt can also be defined as a "1-step chain".
Let me show you an example:
---provider: <any-provider>model: <any-model><other-configuration>---
{{ my_model = "gpt-4o" }}
/* This could also just be a parameter, so you
do not need to define it here */
<stepmodel={{my_model}} > /* Model is being replaced here for this step */
{{ if my_model.includes("gpt") }}
Model is gpt
{{ endif }}
/* Rest of the prompt */
</step>
I am currently using your latitude-llm, and I find it very useful. However, I have a need to dynamically replace model parameters based on variables (e.g., switching
model=gpt-4o
togpt-4o
). I believe this logic would be well-suited for integration into the template engine. Additionally, support for syntax like{{if .model | contains "gpt"}} model is gpt model {{end}}
would be incredibly helpful. I’d like to ask if there are any plans to support such functionality, as I think it would be a great feature to have.The text was updated successfully, but these errors were encountered: