Skip to content

Commit

Permalink
Merge branch 'production' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
parzival418 committed Nov 10, 2023
2 parents c05b420 + 716a197 commit 86a006f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/server/src/services/agents/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const agent = (app: Application) => {
// remove unwanted properties from the message
// embeddings and spells are large data packages we don't need on the client
const cleanMessage = removeUnwantedProperties(message, [
'embedding',
// 'embedding',
'spell',
])

Expand Down
5 changes: 2 additions & 3 deletions packages/core/shared/src/nodes/text/GenerateText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ export class GenerateText extends MagickComponent<Promise<WorkerReturn>> {
]) as CompletionProvider[]

const model = (node.data as { model: string }).model as string
const customModel = (node.data as { customModel: string })
.customModel as string
const customModel = node.data.customModel as string | undefined

// get the provider for the selected model
const provider = completionProviders.find(provider =>
Expand All @@ -195,7 +194,7 @@ export class GenerateText extends MagickComponent<Promise<WorkerReturn>> {
}

// check if custom model and regex check for word fine-tune in model
if (customModel.length > 0) {
if (customModel && customModel.length > 0) {
node.data.customModel = customModel
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ export async function makeChatCompletion(
const system = inputs['system']?.[0] as string
const conversation = inputs['conversation']?.[0] as any
let func = inputs['function']?.[0] as string
const customModel = node?.data?.customModel as string | undefined

// Get or set default settings
const settings = {
model:
(node?.data?.customModel as string).length > 0
customModel && customModel.length > 0
? node?.data?.customModel
: node?.data?.model,
temperature: parseFloat((node?.data?.temperature as string) ?? '0.0'),
Expand Down

0 comments on commit 86a006f

Please sign in to comment.