Code Monkey home page Code Monkey logo

cleverbird's Introduction

Hi! I'm B.T

I'm a passionate software developer and entrepreneur specializing in AI-driven applications. With over two decades of experience in the tech industry, I've had the opportunity to work on a diverse range of projects, from game development to enterprise software to generative art and music. My focus is on creating innovative, engaging, and meaningful experiences that push the boundaries of technology and delight users. I'm driven by a constant curiosity and a deep desire to make a positive impact on the world through my work.

Currently, I'm working remotely at Zilliant where I help to guide the technological future of the company by providing vision and direction for the design of our systems. In addition to my full-time work, I'm also an independent researcher, focusing on the development of software to explore computational creativity and artificial intelligence. I have presented at international conferences and have published several papers on the subject.

cleverbird's People

Contributors

btfranklin avatar pascalfribi avatar ronaldmannak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cleverbird's Issues

ADA-2 floating point precession

I noticed embeddings uses 64-bit precision Double (e.g. public typealias Vector = [Double]). From what I understand, ADA-2 inference returns 32-bit precision Floats.

Is there any specific reason to use Double instead of Float here?

Demo SwiftUI Chat app

Would be great to have a Demo SwiftUI Chat app where we can add functionalities and submit PRs

function calling "array" issue

Thank you very much for the release of 3.0.0.
Regarding function calling, when the parameter type is an "array", it seems that "items" are needed to describe it. Please see the following example:

"functions": [
    {
      "name": "get_current_weather",
      "description": "Get the current weather in a given location",
      "parameters": {
        "type": "object",
        "properties": {
          "location": {
            "type": "array",
            "description": "The cities, e.g. San Francisco, CA",
            "items": {
                "type": "string",
                "description": "the city"
            }
          },
          "unit": {
            "type": "string",
            "enum": ["celsius", "fahrenheit"]
          }
        },
        "required": ["location", "unit"]
      }
    }
 ]

If I ask:

{
   "role": "user",
   "content": "what is the weather like today in Bangalore and New yourk"
}

then the response will be:

 "function_call": {
    "name": "get_current_weather",
    "arguments": "{\n  \"location\": [\"Bangalore\", \"New York\"],\n  \"unit\": \"celsius\"\n}"
}

the location will be an array of strings

Response status code was unacceptable: 404

The following

let openAIAPIConnection = OpenAIAPIConnection(apiKey: CHATGPT_API_KEY)
let chatThread = ChatThread(connection: openAIAPIConnection)
    .addSystemMessage("You are a helpful assistant.")
    .addUserMessage("Who won the world series in 2020?")
let completion = try! await chatThread.complete()
print(completion)

Fails at runtime with the following message:

Fatal error: 'try!' expression unexpectedly raised an error: CleverBird.CleverBirdError.requestFailed(message: "Response status code was unacceptable: 404.")

I have yet to determine if it's me or the library.

Functions

I am unable to use functions.

First of all the method ChatThreas.addFunctionResponse is not marked public, so I cannot add an response from a function call.
Second if I set it to public and call the completion, chat GPT sends statusCode 400 telling that an object is not of type string.

No idea what is going wrong here.

Index out of range in getPairs(in:)

I received this crash report from a TestFlight user. I haven't been able to replicate the issue.

Date/Time:           2023-07-11 22:10:11.7624 +0700
Launch Time:         2023-07-11 22:09:50.4776 +0700
OS Version:          iPhone OS 16.5.1 (20F75)
Release Type:        User
Baseband Version:    4.02.01
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000102880fb4
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [573]

Triggered by Thread:  0

Thread 0 Crashed:
0   Pico                          	0x0000000102880fb4 Swift runtime failure: Index out of range + 0 (<compiler-generated>:0)
1   Pico                          	0x0000000102880fb4 specialized Array._checkSubscript(_:wasNativeTypeChecked:) + 0 (<compiler-generated>:0)
2   Pico                          	0x0000000102880fb4 specialized Array.subscript.getter + 0 (<compiler-generated>:0)
3   Pico                          	0x0000000102880fb4 getPairs(in:) + 228 (TokenEncoder.swift:33)
4   Pico                          	0x000000010288128c TokenEncoder.bpe(token:) + 336 (TokenEncoder.swift:61)
5   Pico                          	0x000000010287ff94 TokenEncoder.encode(text:) + 1376 (TokenEncoder.swift:107)
6   Pico                          	0x000000010235ba18 closure #1 in OpenAIClient.summarizeChatContext(systemPrompt:history:model:) + 28 (OpenAIClient.swift:197)


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000224086e40   x1: 0x80000004ffffffff   x2: 0x0000000000000002   x3: 0x00000001c6b3a2e8
    x4: 0x000000011e53c000   x5: 0x000000016dabe1a0   x6: 0x0000000000000001   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x80000000ffffffff  x10: 0x0000000000000004  x11: 0x6e2d41e230fde5f5
   x12: 0x6963d0e45c231280  x13: 0x5c2312806963d0e4  x14: 0x0000000000000095  x15: 0x0000000000000e31
   x16: 0x00000001c6b7f964  x17: 0x2e3f0002249e93a8  x18: 0x0000000000000000  x19: 0x000000011e53c000
   x20: 0x0000000102eb20a0  x21: 0xe000000000000000  x22: 0x0000000000000000  x23: 0x0000000000000000
   x24: 0x0000000224086e40  x25: 0x0000000224086e40  x26: 0xe000000000000000  x27: 0x000000000000000f
   x28: 0x0000000000000000   fp: 0x000000016dabe1e0   lr: 0x000000010288128c
    sp: 0x000000016dabe170   pc: 0x0000000102880fb4 cpsr: 0x60000000
   esr: 0xf2000001 (Breakpoint) brk 1

How to customize API BaseURL?

Sometimes we don't directly use OpenAI's API, but instead wrap it with a proxy for usage. How to configure the BaseURL of the API?

Function calling on stream mode

Thanks for this great library!

Is it possible to call a function on stream mode (and not get it response streamed)?

Ex:
Messages are streamed
Func calls are not streamed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.