Skip to content

Commit

Permalink
Merge pull request janhq#935 from janhq/fix/inference_model_parameters
Browse files Browse the repository at this point in the history
fix: model parameters for inference extensions
  • Loading branch information
hiro-v authored Dec 11, 2023
2 parents c4d8def + 97f3733 commit 79b9997
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion extensions/inference-nitro-extension/src/helpers/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function requestInference(
messages: recentMessages,
model: model.id,
stream: true,
// ...model.parameters,
...model.parameters,
});
fetch(INFERENCE_URL, {
method: "POST",
Expand Down
4 changes: 2 additions & 2 deletions extensions/inference-openai-extension/src/helpers/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function requestInference(
const requestBody = JSON.stringify({
messages: recentMessages,
stream: true,
model: model_id
// ...model.parameters,
model: model_id,
...model.parameters,
});
fetch(`${engine.full_url}`, {
method: "POST",
Expand Down
4 changes: 1 addition & 3 deletions models/gpt-3.5-turbo-16k-0613/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"description": "OpenAI GPT 3.5 Turbo 16k 0613 model is extremely good",
"format": "api",
"settings": {},
"parameters": {
"max_tokens": 4096
},
"parameters": {},
"metadata": {
"author": "OpenAI",
"tags": ["General", "Big Context Length"]
Expand Down
8 changes: 3 additions & 5 deletions models/gpt-4/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
"source_url": "https://openai.com",
"id": "gpt-4",
"object": "model",
"name": "OpenAI GPT 3.5",
"name": "OpenAI GPT 4",
"version": 1.0,
"description": "OpenAI GPT 3.5 model is extremely good",
"description": "OpenAI GPT 4 model is extremely good",
"format": "api",
"settings": {},
"parameters": {
"max_tokens": 4096
},
"parameters": {},
"metadata": {
"author": "OpenAI",
"tags": ["General", "Big Context Length"]
Expand Down

0 comments on commit 79b9997

Please sign in to comment.