Guide for End-to-End Connection with Gemini in PromptFlow #3971
Labels
enhancement
New feature or request
no-recent-activity
There has been no recent activity on this issue/pull request
Hi PromptFlow team,
I am trying to integrate Gemini with PromptFlow but couldn't find a detailed guide on setting up an end-to-end connection. Could you provide a step-by-step guide or point me to relevant documentation?
Specifically, I need help with:
Any guidance would be greatly appreciated!
I am also trying to integrate Gemini with PromptFlow using CustomConnection, but I am encountering an error when running pf.flow.test
ResolveToolError: Tool load failed in 'classify_with_llm': (InvalidConnectionType) Connection type CustomConnection is not supported for LLM.
Here is how I have configured my flow.dag.yaml:
- name: classify_with_llm type: CustomConnection source: type: code path: classify_with_llm.jinja2 inputs: model: "gemini-1.5-flash" max_tokens: 128 temperature: 0.2 url: "${inputs.url}" text_content: "${summarize_text_content.output}" examples: "${prepare_examples.output}" api: chat connection: gemini_connection aggregation: false
And my connections/gemini_connection.yaml:
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/CustomConnection.schema.json name: gemini_connection type: custom configs: endpoint: "https://generativelanguage.googleapis.com" secrets: api_key: "api_key"
Does PromptFlow support CustomConnection for LLMs like Gemini?
If not, what is the correct way to configure Gemini as an LLM connection in PromptFlow?
Thanks in advance.
The text was updated successfully, but these errors were encountered: