revelrylabs / prodops_ex

The Elixir SDK for ProdOps
MIT License
0 stars 0 forks source link

Prompt Template List Endpoint #23

Closed jacksonoberkirch closed 6 months ago

jacksonoberkirch commented 6 months ago

What I'm doing:

Adding prompt template module needed for prompt template list endpoint What it looks like:

## Returns
 {:ok,
        %{
          status: "ok",
          response: %{
            "prompt_templates" => [
              {
                "id": 3,
                "name": "Example Prompt",
                "content": "This is an example prompt template body",
                "description": "This is an example prompt template",
                "custom_variables": [
                    {
                        "id": "df57af61-7741-4152-b5eb-0484b281eaaa",
                        "name": "Example Input",
                        "description": null
                    }
                ],
                "document_queries": [
                    {
                        "id": "dcbbc393-9f00-4020-a150-ac5fa5f66095",
                        "name": "Example Document Query",
                        "query": "{custom.Example Input}",
                        "count": 1,
                        "type": "code",
                        "min_score": 0.75,
                        "collection_id": null,
                        "collection_ids": []
                    }
                ]
            },
              ...
            ]
          }
        }}
  """
 def get_prompt_templates_for_artifact_type(params, config) do
    PromptTemplate.get_prompt_templates_for_artifact_type(params, config)
  end

What I'd like feedback on:

Anything you can think of, let me know if you have any questions!