-
Notifications
You must be signed in to change notification settings - Fork 147
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
adding blueprint examples for remote inference #1155
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
```json | ||
{ | ||
"name": "Cohere Connector: embedding", | ||
"description": "The connector to cohere embedding model", | ||
"version": 1, | ||
"protocol": "http", | ||
"credential": { | ||
"cohere_key": "<PLEASE ADD YOUR Cohere API KEY HERE>" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://api.cohere.ai/v1/embed", | ||
"headers": { | ||
"Authorization": "Bearer ${credential.cohere_key}" | ||
}, | ||
"request_body": "{ \"texts\": ${parameters.prompt}, \"truncate\": \"END\" }" | ||
} | ||
] | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
```json | ||
{ | ||
"name": "OpenAI Chat Connector", | ||
"description": "The connector to public OpenAI model service for GPT 3.5", | ||
"version": 1, | ||
"protocol": "http", | ||
"parameters": { | ||
"endpoint": "api.openai.com", | ||
"model": "gpt-3.5-turbo" | ||
}, | ||
"credential": { | ||
"openAI_key": "<PLEASE ADD YOUR OPENAI API KEY HERE>" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://${parameters.endpoint}/v1/chat/completions", | ||
"headers": { | ||
"Authorization": "Bearer ${credential.openAI_key}" | ||
}, | ||
"request_body": "{ \"model\": \"${parameters.model}\", \"messages\": ${parameters.messages} }" | ||
} | ||
] | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
```json | ||
{ | ||
"name": "OpenAI Connector", | ||
"description": "The connector to public OpenAI model service for completions", | ||
"version": 1, | ||
"protocol": "http", | ||
"parameters": { | ||
"endpoint": "api.openai.com", | ||
"max_tokens": 7, | ||
"temperature": 0, | ||
"model": "text-davinci-003" | ||
}, | ||
"credential": { | ||
"openAI_key": "<PLEASE ADD YOUR OPENAI API KEY HERE>" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://${parameters.endpoint}/v1/completions", | ||
"headers": { | ||
"Authorization": "Bearer ${credential.openAI_key}" | ||
}, | ||
"request_body": "{ \"model\": \"${parameters.model}\", \"prompt\": \"${parameters.prompt}\", \"max_tokens\": ${parameters.max_tokens}, \"temperature\": ${parameters.temperature} }" | ||
} | ||
] | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,28 @@ | ||||||
```json | ||||||
{ | ||||||
"name": "sagemaker: embedding", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"description": "Test connector for Sagemaker embedding model", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"version": 1, | ||||||
"protocol": "aws_sigv4", | ||||||
"credential": { | ||||||
"access_key": "<PLEASE ADD YOUR AWS ACCESS KEY HERE>", | ||||||
"secret_key": "<PLEASE ADD YOUR AWS SECRET KEY HERE>", | ||||||
"session_token": "<PLEASE ADD YOUR AWS SECURITY TOKEN HERE>" | ||||||
}, | ||||||
"parameters": { | ||||||
"region": "<PLEASE ADD YOUR AWS REGION TOKEN HERE>", | ||||||
"service_name": "sagemaker" | ||||||
}, | ||||||
"actions": [ | ||||||
{ | ||||||
"action_type": "predict", | ||||||
"method": "POST", | ||||||
"headers": { | ||||||
"content-type": "application/json" | ||||||
}, | ||||||
"url": "https://runtime.sagemaker.${parameters.region}.amazonaws.com/endpoints/lmi-model-2023-06-24-01-35-32-275/invocations", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete this URL , this is just our internal Sagemaker endpiont.
Suggested change
|
||||||
"request_body": "[\"${parameters.inputs}\"]" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This request body is just from our test sagemaker embedding model. User should add their own body template.
Suggested change
|
||||||
} | ||||||
] | ||||||
} | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.