Skip to content

Commit

Permalink
[AI] Passthrough token + Moderation endpoint support (#10260)
Browse files Browse the repository at this point in the history
  • Loading branch information
EItanya authored Nov 1, 2024
1 parent 33c0980 commit 8e26c5c
Show file tree
Hide file tree
Showing 12 changed files with 1,633 additions and 572 deletions.
14 changes: 14 additions & 0 deletions changelog/v1.18.0-beta31/ai-modertion-passthrough-token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
- type: NEW_FEATURE
issueLink: https://github.com/solo-io/solo-projects/issues/7115
resolvesIssue: false
description: >-
Add API to enable passthrough auth strategy for AI services. This allows users to pass through the token
to the AI service, rather than requiring them to supply a seprate token for the AI service.
This can be useful if Identity federation has already been done for the backend in question
- type: NEW_FEATURE
issueLink: https://github.com/solo-io/solo-projects/issues/7070
resolvesIssue: false
description: >-
Add API to add moderation as a possible Prompt Guard step. This allows users to add
run the user prompt through a moderation service before sending it to the backend LLM.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_RouteOption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,28 @@ spec:
minimum: 0
type: integer
type: object
moderation:
properties:
openai:
properties:
authToken:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
model:
type: string
type: object
type: object
regex:
properties:
action:
Expand Down Expand Up @@ -185,6 +207,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -204,6 +228,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down Expand Up @@ -257,6 +283,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -276,6 +304,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down
30 changes: 30 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_RouteTable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,28 @@ spec:
minimum: 0
type: integer
type: object
moderation:
properties:
openai:
properties:
authToken:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
model:
type: string
type: object
type: object
regex:
properties:
action:
Expand Down Expand Up @@ -295,6 +317,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -314,6 +338,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down Expand Up @@ -367,6 +393,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -386,6 +414,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down
30 changes: 30 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_VirtualService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3209,6 +3209,28 @@ spec:
minimum: 0
type: integer
type: object
moderation:
properties:
openai:
properties:
authToken:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
model:
type: string
type: object
type: object
regex:
properties:
action:
Expand Down Expand Up @@ -3314,6 +3336,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -3333,6 +3357,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down Expand Up @@ -3386,6 +3412,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand All @@ -3405,6 +3433,8 @@ spec:
properties:
inline:
type: string
passthrough:
type: object
secretRef:
properties:
name:
Expand Down
Loading

0 comments on commit 8e26c5c

Please sign in to comment.