Skip to content

Commit

Permalink
chore: changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Oct 22, 2024
1 parent f5b9f0f commit 33bcbe0
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 6 deletions.
43 changes: 43 additions & 0 deletions .changeset/thick-eyes-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
'@agentic/core': minor
'@agentic/ai-sdk': minor
'@agentic/bing': minor
'@agentic/calculator': minor
'@agentic/clearbit': minor
'@agentic/dexa': minor
'@agentic/dexter': minor
'@agentic/diffbot': minor
'@agentic/e2b': minor
'@agentic/exa': minor
'@agentic/firecrawl': minor
'@agentic/genkit': minor
'@agentic/github': minor
'@agentic/hacker-news': minor
'@agentic/hunter': minor
'@agentic/jina': minor
'@agentic/langchain': minor
'@agentic/llamaindex': minor
'@agentic/midjourney': minor
'@agentic/novu': minor
'@agentic/people-data-labs': minor
'@agentic/perigon': minor
'@agentic/polygon': minor
'@agentic/predict-leads': minor
'@agentic/proxycurl': minor
'@agentic/search-and-crawl': minor
'@agentic/searxng': minor
'@agentic/serpapi': minor
'@agentic/serper': minor
'@agentic/slack': minor
'@agentic/social-data': minor
'@agentic/stdlib': minor
'@agentic/tavily': minor
'@agentic/twilio': minor
'@agentic/twitter': minor
'@agentic/weather': minor
'@agentic/wikidata': minor
'@agentic/wikipedia': minor
'@agentic/wolfram-alpha': minor
---

Update deps
39 changes: 33 additions & 6 deletions packages/core/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { cleanStringForModel, stringifyForModel } from './utils'
* Generic/default OpenAI message without any narrowing applied.
*/
export interface Msg {
/**
* The role of the messages author. One of `system`, `user`, `assistant`,
* 'tool', or `function`.
*/
role: Msg.Role

/**
* The contents of the message. `content` may be null for assistant messages
* with function calls or `undefined` for assistant messages if a `refusal`
Expand All @@ -19,12 +25,6 @@ export interface Msg {
*/
refusal?: string | null

/**
* The role of the messages author. One of `system`, `user`, `assistant`,
* 'tool', or `function`.
*/
role: Msg.Role

/**
* The name and arguments of a function that should be called, as generated
* by the model.
Expand Down Expand Up @@ -59,6 +59,33 @@ export interface LegacyMsg {
name?: string
}

/** Used for multimodal chat messages. */
export type ChatMessageContentPart =
| {
type: 'text'
text: string
}
// User messages only.
| {
type: 'image_url'
image_url: {
url: string
detail?: 'low' | 'high' | 'auto' | (string & {})
}
}
| {
type: 'input_audio'
input_audio: {
data: string
format: 'mp3' | 'wav' | (string & {})
}
}
// Assistant messages only.
| {
type: 'refusal'
refusal: string
}

/** Narrowed OpenAI Message types. */
export namespace Msg {
/** Possible roles for a message. */
Expand Down

0 comments on commit 33bcbe0

Please sign in to comment.