Skip to content

Commit

Permalink
fix default config of ai-cache plugin (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlanni authored Dec 26, 2024
1 parent 99a3c46 commit 5a1fcb7
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions backend/sdk/src/main/resources/plugins/ai-cache/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ spec:
redis:
serviceName: my-redis.dns
timeout: 2000
cacheKeyFrom:
requestBody: "[email protected]"
cacheValueFrom:
responseBody: "choices.0.message.content"
cacheStreamValueFrom:
responseBody: "choices.0.delta.content"
cacheKeyFrom: "[email protected]"
cacheValueFrom: "choices.0.message.content"
cacheStreamValueFrom: "choices.0.delta.content"
returnResponseTemplate: |
{"id":"from-cache","choices":[{"index":0,"message":{"role":"assistant","content":"%s"},"finish_reason":"stop"}],"model":"gpt-4o","object":"chat.completion","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
returnStreamResponseTemplate: |
Expand All @@ -44,12 +41,9 @@ spec:
redis:
serviceName: my-redis.dns
timeout: 2000
cacheKeyFrom:
requestBody: "[email protected]"
cacheValueFrom:
responseBody: "choices.0.message.content"
cacheStreamValueFrom:
responseBody: "choices.0.delta.content"
cacheKeyFrom: "[email protected]"
cacheValueFrom: "choices.0.message.content"
cacheStreamValueFrom: "choices.0.delta.content"
returnResponseTemplate: |
{"id":"from-cache","choices":[{"index":0,"message":{"role":"assistant","content":"%s"},"finish_reason":"stop"}],"model":"gpt-4o","object":"chat.completion","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
returnStreamResponseTemplate: |
Expand Down

0 comments on commit 5a1fcb7

Please sign in to comment.