You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Swift Package for Compiler Inc's AI Backend API
4
4
5
5
## Getting started
6
6
7
-
Login to the [Compiler Developer Dshboard](https://developer.compiler.inc/) and choose "Create a new app". Give it a name and description and you will be given an API key. Save that API key, this is the only time it will be shown to you.
7
+
Login to the [Compiler Developer Dashboard](https://developer.compiler.inc/) and choose "Create a new app". Give it a name and description and you will be given an API key. Save that API key, this is the only time it will be shown to you.
8
8
9
9
On the next page you will see an app ID. You will use that in your code and set up functions for use with Compiler inside your own project next.
10
10
@@ -20,7 +20,7 @@ At some central location, in your code set up a client:
20
20
21
21
Next you create an enum for "CompilerFunction". This enum conforms `Sendable` and contains a case for each function you're making available. for example:
But, you'll want to add tradtional Swift-style documentation generating comments as well, because these will be use in a later step to help train the AI to best respond to your users. For instance:
34
34
35
-
```
35
+
```swift
36
36
enumCompilerFunction: Sendable {
37
37
/// Users can invoke this function to make something happen
38
38
casedoSomething
@@ -56,7 +56,7 @@ There are more things that you'll want to add to the CompilerFunction enum, but
56
56
57
57
On the same page that you got your AppID you will see you available functions, which will start with only one thing, a "NoOp" which is returned when no appropriate functions were found. Head over to the "Function Builder" and open the tab for "Swift Enum Import". In the Swift text area, paste in the complete text of the `CompilerFunction` enum and submit to get back a version of your Swift enum with a `case` for `noOp` and two new functions:
0 commit comments