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

Add new model gpt-4o #612

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assistant_dists/universal_prompted_assistant/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ services:
- "./common:/src/common"
ports:
- 8180:8180
openai-api-gpt4o:
volumes:
- "./services/openai_api_lm:/src"
- "./common:/src/common"
ports:
- 8181:8181
gigachat-api:
volumes:
- "./services/gigachat_api_lm:/src"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
sentence-ranker:8128,
transformers-lm-gptjt:8161, openai-api-chatgpt:8145, openai-api-davinci3:8131,
openai-api-gpt4:8159, openai-api-gpt4-32k:8160, openai-api-chatgpt-16k:8167,
openai-api-gpt4-turbo:8180, gigachat-api:8187, gigachat-pro-api:8188, gigachat-plus-api:8189,
dff-universal-prompted-skill:8147"
openai-api-gpt4-turbo:8180, openai-api-gpt4o:8181, gigachat-api:8187, gigachat-pro-api:8188,
gigachat-plus-api:8189, dff-universal-prompted-skill:8147"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1000}

sentseg:
Expand Down Expand Up @@ -220,6 +220,25 @@ services:
reservations:
memory: 100M

openai-api-gpt4o:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8181
SERVICE_NAME: openai_api_gpt4o
PRETRAINED_MODEL_NAME_OR_PATH: gpt-4o
context: .
dockerfile: ./services/openai_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8181
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

gigachat-api:
env_file: [ .env ]
build:
Expand Down
6 changes: 6 additions & 0 deletions assistant_dists/universal_ru_prompted_assistant/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ services:
- "./common:/src/common"
ports:
- 8180:8180
openai-api-gpt4o:
volumes:
- "./services/openai_api_lm:/src"
- "./common:/src/common"
ports:
- 8181:8181
gigachat-api:
volumes:
- "./services/gigachat_api_lm:/src"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
dialogrpt-ru:8122, transformers-lm-ruxglm:8171, transformers-lm-rugpt35:8178,
openai-api-chatgpt:8145, openai-api-davinci3:8131,
openai-api-gpt4:8159, openai-api-gpt4-32k:8160, openai-api-chatgpt-16k:8167,
openai-api-gpt4-turbo:8180, gigachat-api:8187, gigachat-pro-api:8188, gigachat-plus-api:8189,
dff-universal-ru-prompted-skill:8161"
openai-api-gpt4-turbo:8180, openai-api-gpt4o:8181, gigachat-api:8187, gigachat-pro-api:8188,
gigachat-plus-api:8189, dff-universal-ru-prompted-skill:8161"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1800}
HIGH_PRIORITY_INTENTS: 0
RESTRICTION_FOR_SENSITIVE_CASE: 0
Expand Down Expand Up @@ -214,6 +214,25 @@ services:
reservations:
memory: 100M

openai-api-gpt4o:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8181
SERVICE_NAME: openai_api_gpt4o
PRETRAINED_MODEL_NAME_OR_PATH: gpt-4o
context: .
dockerfile: ./services/openai_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8181
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

gigachat-api:
env_file: [ .env ]
build:
Expand Down
2 changes: 1 addition & 1 deletion components.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
8178 transformers-lm-rugpt35
8179 dff-robot-prompted-skill
8180 openai-api-gpt4-turbo
8181
8181 openai-api-gpt-4o
8182
8183 external-integration-skill
8184 external-fake-server
Expand Down
25 changes: 25 additions & 0 deletions components/jaWueh23hfsdias9cdjasdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: openai_api_gpt4o
display_name: GPT-4o
component_type: Generative
model_type: NN-based
is_customizable: false
author: [email protected]
description: GPT-4o (“o” for “omni”) is our most advanced model. It is multimodal (accepting text or image inputs and
outputting text), and it has the same high intelligence as GPT-4 Turbo but is much more efficient—it generates text
2x faster and is 50% cheaper. The maximum number of output tokens for this model is 128000.
ram_usage: 100M
gpu_usage: null
group: services
connector:
protocol: http
timeout: 120.0
url: http://openai-api-gpt4o:8181/respond
dialog_formatter: null
response_formatter: null
previous_services: null
required_previous_services: null
state_manager_method: null
tags: null
endpoint: respond
service: services/openai_api_lm/service_configs/openai-api-gpt-4o
date_created: '2024-05-15T09:45:32'
2 changes: 1 addition & 1 deletion services/openai_api_lm/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"gpt-4-32k": json.load(open("common/generative_configs/openai-chatgpt.json", "r")),
"gpt-4-1106-preview": json.load(open("common/generative_configs/openai-chatgpt.json", "r")),
}
CHAT_COMPLETION_MODELS = ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "gpt-4-32k", "gpt-4-1106-preview"]
CHAT_COMPLETION_MODELS = ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "gpt-4-32k", "gpt-4-1106-preview", "gpt-4o"]


def generate_responses(context, openai_api_key, openai_org, prompt, generation_params, continue_last_uttr=False):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SERVICE_PORT: 8181
SERVICE_NAME: openai-api-gpt4o
PRETRAINED_MODEL_NAME_OR_PATH: gpt-4o
FLASK_APP: server
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: openai-api-gpt4o
endpoints:
- respond
- generate_goals
compose:
env_file:
- .env
build:
args:
SERVICE_PORT: 8181
SERVICE_NAME: openai_api_gpt4_o
PRETRAINED_MODEL_NAME_OR_PATH: gpt-4o
FLASK_APP: server
context: .
dockerfile: ./services/openai_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8181
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M
volumes:
- ./services/openai_api_lm:/src
- ./common:/src/common
ports:
- 8181:8181
proxy: null
Loading