Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike - SDK V2 - API Changes Investigation #46

Open
6 tasks
estreeper opened this issue May 6, 2024 · 2 comments
Open
6 tasks

Spike - SDK V2 - API Changes Investigation #46

estreeper opened this issue May 6, 2024 · 2 comments
Assignees

Comments

@estreeper
Copy link
Collaborator

Background

Determine API modifications needed to support version 2 of the ProdOps SDK.

Acceptance Criteria

Scenario: Identify API changes for ProdOps-SDK-Elixir V2

  • Given the current prodops API is in use
  • When reviewing the codebase and functionality of the SDK V1
  • Then identify all endpoints and features that require changes for SDK V2 compatibility
  • And document necessary deprecations, additions, or modifications
  • And evaluate any new requirements for V2 that are not present in V1.
  • And create a comprehensive list of tasks for updating the API to meet V2 standards.

created by [email protected] using Prodops

@jacksonoberkirch jacksonoberkirch self-assigned this May 6, 2024
@jacksonoberkirch jacksonoberkirch changed the title Engineer - SDK V2 - API Changes Investigation Spike - SDK V2 - API Changes Investigation May 6, 2024
@estreeper
Copy link
Collaborator Author

Copying in this comment I left in Slack:

I've noticed that in a lot of the docs I'm writing (I'm working on a documentation chatbot right now) the hardest part of the instructions are on how to add the prompt template. I also had to add instructions on creating the Artifact Type and on creating a Collection and adding Data Sources/Documents to it. The last one is probably not such a big deal, because it's probably easier to use a GUI than an API, but adding the Artifact Type and the Prompt Template via the API would be really nice and IMO higher priority.
For many of these endpoints, we could also definitely infer a lot of this data. We talked about the artifact_slug, but for instance project_id probably can be as well. For instance, we could go from:

    iex> ProdopsEx.Artifact.create(%{
    ...>   prompt_template_id: 2,
    ...>   artifact_slug: "story",
    ...>   project_id: 1,
    ...>   inputs: [
    ...>     %{name: "Context", value: "this is a test"}
    ...>   ]
    ...> })

to:

    iex> ProdopsEx.Artifact.create(%{
    ...>   prompt_template_id: 2,
    ...>   inputs: [
    ...>     %{name: "Context", value: "this is a test"}
    ...>   ]
    ...> })

We should know which project a prompt_template_id belongs to on the backend.
I'm also seeing an issue where I don't think document queries are getting hydrated via API, but I'll need to look into it a bit more

@jacksonoberkirch
Copy link
Contributor

API V2/V3 Proposed Changes:

  1. (POST) Prompt Template creation (new endpoint) (likely will be the most complicated. as will require passing custom inputs, document attachments, and document queries)
  2. (POST) Create Artifact (and stream create) (updating existing endpoint) (need to allow for passing document query values)
  3. (POST) Create Artifact Type (new endpoint)
  4. (POST) Create Project (new endpoint)
  5. (GET) Get documents list (new endpoint) adding more data center endpoints for document management
  6. (POST) Adding data source connection (GitHub) (new endpoint) (passing in route and api key)
  7. (POST) Adding document to collection (New endpoint)
  8. Updating existing routes to not use artifact type slug (no longer necessary with the removal of bespoke artifact types)
  9. (POST) Invite new user to team (new endpoint) (adding endpoints for team admin management
  10. (POST) promote/demote team member/team admin (new endpoint)

Goal here is to allow users to use the SDK/API without the need to ever visit the front end (other than initial account creation)

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

No branches or pull requests

2 participants