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

@callstack/byorg-core

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@callstack/byorg-core - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

12

CHANGELOG.md
# @callstack/byorg-core
## 0.8.0
### Minor Changes
- 21d4f2e: core: expose `ChatModel.name` property
### Patch Changes
- cb21f9a: Fixed missing references
- Updated dependencies [ea21cc7]
- @callstack/byorg-utils@0.8.0
## 0.7.0

@@ -4,0 +16,0 @@

8

dist/esm/index.d.ts

@@ -43,2 +43,3 @@ import { LanguageModel } from 'ai';

export declare interface ChatModel {
name: string;
generateResponse(context: RequestContext): Promise<AssistantResponse>;

@@ -219,4 +220,5 @@ }

export declare class VercelChatModelAdapter implements ChatModel {
private readonly _options;
constructor(_options: VercelChatModelAdapterOptions);
config: VercelChatModelAdapterConfig;
constructor(config: VercelChatModelAdapterConfig);
get name(): string;
generateResponse(context: RequestContext): Promise<AssistantResponse>;

@@ -228,3 +230,3 @@ private executeRequestWithStreaming;

export declare type VercelChatModelAdapterOptions = {
export declare type VercelChatModelAdapterConfig = {
languageModel: LanguageModel;

@@ -231,0 +233,0 @@ maxTokens?: number;

@@ -116,4 +116,4 @@ import * as __WEBPACK_EXTERNAL_MODULE__callstack_byorg_utils__ from "@callstack/byorg-utils";

return {
addReferences (references) {
for (const ref of references){
addReferences (referencesToAdd) {
for (const ref of referencesToAdd){
const refKey = getKey(ref);

@@ -298,6 +298,9 @@ if (!referencesKeys.has(refKey)) {

class VercelChatModelAdapter {
_options;
constructor(_options){
this._options = _options;
config;
constructor(config){
this.config = config;
}
get name() {
return this.config.languageModel.modelId;
}
async generateResponse(context) {

@@ -352,6 +355,6 @@ let systemPrompt = context.systemPrompt();

...VERCEL_AI_SHARED_OPTIONS,
model: this._options.languageModel,
model: this.config.languageModel,
maxTokens: this.config.maxTokens,
maxSteps: this.config.maxSteps,
messages: context.messages,
maxTokens: this._options.maxTokens,
maxSteps: this._options.maxSteps,
tools: context.tools

@@ -382,6 +385,6 @@ });

...VERCEL_AI_SHARED_OPTIONS,
model: this._options.languageModel,
model: this.config.languageModel,
maxTokens: this.config.maxTokens,
maxSteps: this.config.maxSteps,
messages: context.messages,
maxTokens: this._options.maxTokens,
maxSteps: this._options.maxSteps,
tools: context.tools

@@ -550,2 +553,3 @@ });

calls,
name: 'mock',
generateResponse: async (context)=>{

@@ -552,0 +556,0 @@ calls.push([

{
"name": "@callstack/byorg-core",
"version": "0.7.0",
"version": "0.8.0",
"type": "module",

@@ -28,3 +28,3 @@ "license": "MIT",

"zod": "^3.23.8",
"@callstack/byorg-utils": "0.7.0"
"@callstack/byorg-utils": "0.8.0"
},

@@ -31,0 +31,0 @@ "peerDependencies": {

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