Skip to content

v0.5.0 #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9c6664d
Add incudeAlternativeAiToolFiles
danielcampagnolitg Dec 19, 2024
b9cbd58
Add jira webhook boilerplate
danielcampagnolitg Dec 19, 2024
4e7359c
Update SWE agent to optionally take the path to the project, and swit…
danielcampagnolitg Dec 19, 2024
87c07fd
Add gemini-2.0-flash-thinking support
danielcampagnolitg Dec 20, 2024
3509d76
Fix Git.pull()
danielcampagnolitg Dec 20, 2024
a845f1e
Move chat folder
danielcampagnolitg Dec 20, 2024
6a0218c
Update ai sdk and add initial chat attachment support
danielcampagnolitg Dec 25, 2024
0c2630c
Update Groq, Together and Vertex to extend AiLLM
danielcampagnolitg Dec 25, 2024
bd6666d
Update version to 0.5.0
danielcampagnolitg Dec 25, 2024
5ebc47e
Update anthropic sdk versions. Add pdf support for anthropic vertex
danielcampagnolitg Dec 25, 2024
2ce69bf
Log workflow agent duration
danielcampagnolitg Dec 25, 2024
5b8bd1d
Update Cerebras to Llama 3.3 70b
danielcampagnolitg Dec 25, 2024
21a8f80
Save input/output tokens in AiLLM
danielcampagnolitg Dec 25, 2024
e1255d4
Save input/output tokens in AiLLM
danielcampagnolitg Dec 25, 2024
fedaa63
feat: Add error handling with MatSnackBar in conversation component
danielcampagnolitg Dec 26, 2024
623d3b6
Merge branch 'v0.5.0' of https://github.com/TrafficGuard/sophia into …
danielcampagnolitg Dec 26, 2024
129d242
Increase chat LLM selector min width
danielcampagnolitg Dec 26, 2024
4bb04c2
feat: Add PublicWeb.takeScreenshotAndLogs function and tidy up web.ts
danielcampagnolitg Dec 26, 2024
9b4d191
Update web.test.ts
danielcampagnolitg Dec 26, 2024
5106127
Update selectFilesAgent.ts
danielcampagnolitg Jan 6, 2025
eb73bb9
Update chat-routes.ts comment
danielcampagnolitg Jan 6, 2025
1c39b92
Add Firework DeepSeek v3 support
danielcampagnolitg Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sophia/ui",
"version": "0.4.0",
"version": "0.5.0",
"description": "Sophia AI platform",
"author": "https://themeforest.net/user/srcn, Daniel Campagnoli, TrafficGuard Pty Ltd, and contributors",
"license": "https://themeforest.net/licenses/standard",
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const appRoutes: Route[] = [
]
},

// Admin routes
// Module routes
{
path: 'ui',
canActivate: [AuthGuard],
Expand All @@ -74,9 +74,9 @@ export const appRoutes: Route[] = [
initialData: initialDataResolver
},
children: [
{path: 'example', loadChildren: () => import('app/modules/admin/home/home.routes')},
//{path: 'example', loadChildren: () => import('app/modules/admin/home/home.routes')},
{path: 'profile', loadChildren: () => import('app/modules/profile/profile.routes')},
{path: 'chat', loadChildren: () => import('app/modules/admin/apps/chat/chat.routes')},
{path: 'chat', loadChildren: () => import('app/modules/chat/chat.routes')},
{path: 'agents', loadChildren: () => import('app/modules/agents/agent.routes')},
{path: 'code-reviews', loadChildren: () => import('app/modules/code-review/code-review.routes')},
{path: 'actions', loadChildren: () => import('app/modules/actions/actions.routes')},
Expand Down
69 changes: 0 additions & 69 deletions frontend/src/app/modules/admin/apps/chat/chat.types.ts

This file was deleted.

224 changes: 224 additions & 0 deletions frontend/src/app/modules/chat/ai.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
// Types copied from the "ai" npm package so we don't need to install the entire package
// filename is added to FilePart and ImagePart

export type AiMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;

type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
type JSONObject = {
[key: string]: JSONValue;
};
type JSONArray = JSONValue[];

type LanguageModelV1ProviderMetadata = Record<string, Record<string, JSONValue>>;
type ProviderMetadata = LanguageModelV1ProviderMetadata;

/**
Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
*/
type DataContent = string | Uint8Array | ArrayBuffer;

/**
Text content part of a prompt. It contains a string of text.
*/
export interface TextPart {
type: 'text';
/**
The text content.
*/
text: string;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
}
/**
Image content part of a prompt. It contains an image.
*/
export interface ImagePart {
type: 'image';
/**
Image data. Can either be:

- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
- URL: a URL that points to the image
*/
image: DataContent | URL;
/**
Optional mime type of the image.
*/
mimeType?: string;
/** File name */
filename: string;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
}
/**
File content part of a prompt. It contains a file.
*/
export interface FilePart {
type: 'file';
/**
File data. Can either be:

- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
- URL: a URL that points to the image
*/
data: DataContent | URL;
/**
Mime type of the file.
*/
mimeType: string;
/** File name */
filename: string;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
}

type ToolResultContent = Array<{
type: 'text';
text: string;
} | {
type: 'image';
data: string;
mimeType?: string;
}>;
/**
Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
*/
export interface ToolCallPart {
type: 'tool-call';
/**
ID of the tool call. This ID is used to match the tool call with the tool result.
*/
toolCallId: string;
/**
Name of the tool that is being called.
*/
toolName: string;
/**
Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
*/
args: unknown;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
}
/**
Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
*/
interface ToolResultPart {
type: 'tool-result';
/**
ID of the tool call that this result is associated with.
*/
toolCallId: string;
/**
Name of the tool that generated this result.
*/
toolName: string;
/**
Result of the tool call. This is a JSON-serializable object.
*/
result: unknown;
/**
Multi-part content of the tool result. Only for tools that support multipart results.
*/
experimental_content?: ToolResultContent;
/**
Optional flag if the result is an error or an error message.
*/
isError?: boolean;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
}

/**
A system message. It can contain system information.

Note: using the "system" part of the prompt is strongly preferred
to increase the resilience against prompt injection attacks,
and because not all providers support several system messages.
*/
type CoreSystemMessage = {
role: 'system';
content: string;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
};
/**
A user message. It can contain text or a combination of text and images.
*/
type CoreUserMessage = {
role: 'user';
content: UserContent;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
};
/**
Content of a user message. It can be a string or an array of text and image parts.
*/
type UserContent = string | Array<TextPart | ImagePart | FilePart>;
/**
An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
*/
type CoreAssistantMessage = {
role: 'assistant';
content: AssistantContent;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
};
/**
Content of an assistant message. It can be a string or an array of text and tool call parts.
*/
type AssistantContent = string | Array<TextPart | ToolCallPart>;
/**
A tool message. It contains the result of one or more tool calls.
*/
type CoreToolMessage = {
role: 'tool';
content: ToolContent;
/**
Additional provider-specific metadata. They are passed through
to the provider from the AI SDK and enable provider-specific
functionality that can be fully encapsulated in the provider.
*/
experimental_providerMetadata?: ProviderMetadata;
};
/**
Content of a tool message. It is an array of tool result parts.
*/
type ToolContent = Array<ToolResultPart>;
/**
A message that can be used in the `messages` field of a prompt.
It can be a user message, an assistant message, or a tool message.
*/
type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatDrawer } from '@angular/material/sidenav';
import { Chat } from 'app/modules/admin/apps/chat/chat.types';
import { Chat } from 'app/modules/chat/chat.types';

@Component({
selector: 'chat-info',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
RouterStateSnapshot,
Routes,
} from '@angular/router';
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
import { ChatService } from 'app/modules/admin/apps/chat/chat.service';
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
import { EmptyConversationComponent } from 'app/modules/admin/apps/chat/empty-conversation/empty-conversation.component';
import { ChatComponent } from 'app/modules/chat/chat.component';
import { ChatService } from 'app/modules/chat/chat.service';
import { ChatsComponent } from 'app/modules/chat/chats/chats.component';
import { ConversationComponent } from 'app/modules/chat/conversation/conversation.component';
import { EmptyConversationComponent } from 'app/modules/chat/empty-conversation/empty-conversation.component';
import { catchError, throwError } from 'rxjs';

/**
Expand Down
Loading
Loading