Skip to content

Commit

Permalink
Merge pull request #1 from aiden-technologies/manual-setup
Browse files Browse the repository at this point in the history
superagent-v1-beta
  • Loading branch information
simonweniger authored Sep 20, 2023
2 parents 76e0161 + fa711ef commit 16372c1
Show file tree
Hide file tree
Showing 8 changed files with 989 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import PackageDescription

let package = Package(
name: "superagent-swift",
platforms: [
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
Expand Down
26 changes: 26 additions & 0 deletions Sources/Models/Agent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Agent.swift
//
// Created by Simon Weniger on 09.07.23.
//

import Foundation

public struct Agent: Codable {

public var isActive: Bool
public var name: String
public var prompt: String?
public var llmModel: String
public var description: String
public var avatar: String?

public init(name: String, isActive: Bool, prompt: String? = nil, llmModel: String, description: String, avatar: String? = nil) {
self.isActive = isActive
self.name = name
self.prompt = prompt
self.llmModel = llmModel
self.description = description
self.avatar = avatar
}
}
24 changes: 24 additions & 0 deletions Sources/Models/Datasource.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Datasource.swift
//
//
// Created by Simon Weniger (Aiden Technologies) on 19.09.23.
//

import Foundation

public struct Datasource {

public var name: String
public var description: String
public var type: String
public var url: String
public var metadata: [String: Any]?

public init(name: String, description: String, type: String, url: String, metadata: [String: Any]? = nil) {
self.name = name
self.description = description
self.type = type
self.url = url
}
}
19 changes: 19 additions & 0 deletions Sources/Models/LLM.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// LLM.swift
//
//
// Created by Simon Weniger (Aiden Technologies) on 19.09.23.
//
import Foundation

public struct LLM {
public var provider: String
public var apiKey: String
public var options: [String: Any]?

public init(provider: String, apiKey: String, options: [String: Any]? = nil) {
self.provider = provider
self.apiKey = apiKey
self.options = options
}
}
21 changes: 21 additions & 0 deletions Sources/Models/Request.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// PredictAgent.swift
//
// Created by Simon Weniger (Aiden Technologies) on 09.07.23.
//

import Foundation

public struct Request {

public var input: String
public var sessionId: String?
public var enableStreaming: Bool

public init(input: String, sessionId: String? = "", enableStreaming: Bool) {
self.input = input
self.sessionId = sessionId
self.enableStreaming = enableStreaming
}

}
25 changes: 25 additions & 0 deletions Sources/Models/Tool.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// Tool.swift
//
// Created by Simon Weniger (Aiden Technologies) on 09.07.23.
//

import Foundation

public struct Tool {

public var name: String
public var description: String
public var type: String
public var metadata: [String : Any]?
public var returnDirect: Bool?

public init(name: String, description: String, type: String, metadata: [String: Any]? = nil, returnDirect: Bool? = nil) {
self.name = name
self.description = description
self.type = type
self.metadata = metadata
self.returnDirect = returnDirect
}

}
24 changes: 24 additions & 0 deletions Sources/Models/WorkflowStep.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Workflow.swift
//
//
// Created by Simon Weniger (Aiden Technologies) on 19.09.23.
//

import Foundation

public struct WorkflowStep {

public var order: Int
public var agentId: String
public var input: String
public var output: String

public init(order: Int, agentId: String, input: String, output: String) {
self.order = order
self.agentId = agentId
self.input = input
self.output = output
}

}
Loading

0 comments on commit 16372c1

Please sign in to comment.