Skip to content

Commit 97fb681

Browse files
committed
chore: release v9.0.47
1 parent 7629b77 commit 97fb681

File tree

19 files changed

+144
-113
lines changed

19 files changed

+144
-113
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11

22

3+
## [9.0.47](https://github.com/ax-llm/ax/compare/9.0.45...9.0.46) (2024-09-16)
4+
5+
6+
### Features
7+
8+
* ax web first commit ([bccb572](https://github.com/ax-llm/ax/commit/bccb5722302f0c9746e9f3d3567f97c6fff8de32))
9+
* first release of rome ([7629b77](https://github.com/ax-llm/ax/commit/7629b77be1e139ad9e1a6d93a30e6b62423bb82f))
10+
* moved comm. core into useChat hook ([f04c35f](https://github.com/ax-llm/ax/commit/f04c35fc65d5ece9de5cea8a26a8873a15274cde))
11+
* rome is rising ([5d7c0f3](https://github.com/ax-llm/ax/commit/5d7c0f377ecfde91fb5c7fb142cf367e56e3a7ab))
12+
13+
## [9.0.46](https://github.com/ax-llm/ax/compare/9.0.45...9.0.46) (2024-08-16)
14+
15+
16+
### Bug Fixes
17+
18+
* Bind agent functions to instances for correct 'this' context" ([#61](https://github.com/ax-llm/ax/issues/61)) ([ce684ff](https://github.com/ax-llm/ax/commit/ce684ff507e6493b4bfcdae195df5da3ea362e3f))
19+
320
## [9.0.46](https://github.com/ax-llm/ax/compare/9.0.44...9.0.45) (2024-08-16)
421

522

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@
8484
],
8585
"author": "Vikram <https://twitter.com/dosco>",
8686
"private": "true",
87-
"version": "9.0.46"
87+
"version": "9.0.47"
8888
}

src/ai-sdk-provider/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ax-llm/ax-ai-sdk-provider",
3-
"version": "9.0.44",
3+
"version": "9.0.45",
44
"type": "module",
55
"description": "Ax AI SDK Provider for the Vercel AI SDK",
66
"repository": {
@@ -24,7 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@ai-sdk/provider-utils": "^1.0.2",
27-
"@ax-llm/ax": "9.0.46",
27+
"@ax-llm/ax": "9.0.47",
2828
"ai": "^3.2.37",
2929
"zod": "^3.23.8"
3030
},

src/ax/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ax-llm/ax",
3-
"version": "9.0.46",
3+
"version": "9.0.47",
44
"type": "module",
55
"description": "The best library to work with LLMs",
66
"repository": {

src/examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"tsx": "node --env-file=.env --import=tsx"
1414
},
1515
"dependencies": {
16-
"@ax-llm/ax": "9.0.46"
16+
"@ax-llm/ax": "9.0.47"
1717
},
1818
"devDependencies": {
1919
"npm-run-all": "^4.1.5",

src/web-api/src/api/memory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class ChatMemory implements AxAIMemory {
7979

8080
interface GetChatPromptArgs {
8181
chatId: ObjectId;
82-
uptoMessageId: ObjectId;
82+
uptoMessageId?: ObjectId;
8383
}
8484

8585
export const getChatPrompt = async (

src/web-api/src/api/messages.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ export const chatAgentTaskHandler = async (
362362

363363
try {
364364
const { response } = await executeChat(hc, {
365-
agentId: new ObjectId(agentMessage.agent.id),
366-
chatId: new ObjectId(agentMessage.chatId),
367-
query: text,
368-
uptoMessageId: new ObjectId(agentMessage.parentId)
365+
agentId: agentMessage.agent.id,
366+
chatId: agentMessage.chatId,
367+
queryOrTask: text,
368+
uptoMessageId: agentMessage.parentId
369369
});
370370

371371
const updatedAgentMessage = { ...agentMessage, text: response };
@@ -383,13 +383,13 @@ export const chatAgentTaskHandler = async (
383383
interface ExecuteChatArgs {
384384
agentId: ObjectId;
385385
chatId: ObjectId;
386-
query: string;
387-
uptoMessageId: ObjectId;
386+
queryOrTask: string;
387+
uptoMessageId?: ObjectId;
388388
}
389389

390390
const executeChat = async (
391391
hc: Readonly<HandlerContext>,
392-
{ agentId, chatId, query, uptoMessageId }: ExecuteChatArgs
392+
{ agentId, chatId, queryOrTask, uptoMessageId }: ExecuteChatArgs
393393
) => {
394394
const agent = await hc.db
395395
.collection<Agent>('agents')
@@ -402,11 +402,13 @@ const executeChat = async (
402402
const chatHistory = await getChatPrompt(hc.db, { chatId, uptoMessageId });
403403
const mem = new ChatMemory([]);
404404
const ai = await createAI(hc, agent, 'big');
405+
ai.setOptions({ debug: true });
405406
const { markdownResponse } = await chatAgent.forward(
406407
ai,
407408
{
409+
agentDescription: agent.description,
408410
chatHistory,
409-
query
411+
queryOrTask
410412
},
411413
{ mem }
412414
);

src/web-api/src/api/prompts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { AxGen } from '@ax-llm/ax';
22

33
export const chatAgent = new AxGen<
4-
{ chatHistory?: string[]; query: string },
4+
{ agentDescription: string; chatHistory?: string[]; queryOrTask: string },
55
{ markdownResponse: string }
66
>(
7-
'"You are a helpful chat bot. Respond in markdown. Use markdown codeblocks only for code." query, chatHistory?:string[] -> markdownResponse'
7+
'"You are an AI chat agent. Use the provided agent description to guide your behavior. The context of the chat is provided in the chat history use it when responding to your query or performing a task. Respond in markdown. Use markdown codeblocks only for code." agentDescription, chatHistory?:string[], queryOrTask -> markdownResponse'
88
);
99

1010
export const genTitle = new AxGen<

src/web-api/src/api/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const agent = z.strictObject({
1717
aiBigModel: ai,
1818
aiSmallModel: ai,
1919
createdAt: z.coerce.date(),
20-
description: z.string().optional(),
20+
description: z.string(),
2121
name: z.string(),
2222
updatedAt: z.coerce.date().optional(),
2323
userId: z.instanceof(ObjectId)

0 commit comments

Comments
 (0)