Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/data-schema

Package Overview
Dependencies
Maintainers
9
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/data-schema - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

4

dist/cjs/runtime/internals/ai/createSendMessageFunction.js

@@ -11,3 +11,3 @@ 'use strict';

const getCustomUserAgentDetails_1 = require("./getCustomUserAgentDetails");
const createSendMessageFunction = (client, modelIntrospection, conversationId, conversationRouteName, getInternals) => async ({ aiContext, content, toolConfiguration }) => {
const createSendMessageFunction = (client, modelIntrospection, conversationId, conversationRouteName, getInternals) => async (input) => {
const { conversations } = modelIntrospection;

@@ -18,2 +18,4 @@ // Safe guard for standalone function. When called as part of client generation, this should never be falsy.

}
const processedInput = typeof input === 'string' ? { content: [{ text: input }] } : input;
const { content, aiContext, toolConfiguration } = processedInput;
const sendSchema = conversations[conversationRouteName].message.send;

@@ -20,0 +22,0 @@ const sendOperation = (0, custom_1.customOpFactory)(client, modelIntrospection, 'mutation', sendSchema, false, getInternals, (0, getCustomUserAgentDetails_1.getCustomUserAgentDetails)(getCustomUserAgentDetails_1.AiAction.SendMessage));

@@ -53,3 +53,3 @@ import type { Subscription } from 'rxjs';

}
interface ConversationSendMessageInput {
export interface ConversationSendMessageInput {
content: ConversationSendMessageInputContent[];

@@ -71,3 +71,3 @@ aiContext?: string | Record<string, any>;

*/
sendMessage: (input: ConversationSendMessageInput) => SingularReturnValue<ConversationMessage>;
sendMessage: (input: ConversationSendMessageInput | string) => SingularReturnValue<ConversationMessage>;
/**

@@ -74,0 +74,0 @@ * @experimental

{
"name": "@aws-amplify/data-schema",
"version": "1.7.0",
"version": "1.8.0",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "repository": {

@@ -59,3 +59,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
delete: (input: ConversationRouteDeleteInput) => SingularReturnValue<Conversation>;
delete: (
input: ConversationRouteDeleteInput,
) => SingularReturnValue<Conversation>;
/**

@@ -70,3 +72,3 @@ * @experimental

// conversation types
interface ConversationSendMessageInput {
export interface ConversationSendMessageInput {
content: ConversationSendMessageInputContent[];

@@ -92,3 +94,3 @@ aiContext?: string | Record<string, any>;

sendMessage: (
input: ConversationSendMessageInput,
input: ConversationSendMessageInput | string,
) => SingularReturnValue<ConversationMessage>;

@@ -95,0 +97,0 @@ /**

@@ -8,2 +8,3 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

ConversationMessage,
ConversationSendMessageInput,
} from '../../../ai/ConversationType';

@@ -35,3 +36,3 @@ import {

): Conversation['sendMessage'] =>
async ({ aiContext, content, toolConfiguration }) => {
async (input: ConversationSendMessageInput | string) => {
const { conversations } = modelIntrospection;

@@ -43,2 +44,8 @@

}
const processedInput: ConversationSendMessageInput =
typeof input === 'string' ? { content: [{ text: input }] } : input;
const { content, aiContext, toolConfiguration } = processedInput;
const sendSchema = conversations[conversationRouteName].message.send;

@@ -45,0 +52,0 @@ const sendOperation = customOpFactory(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc