Skip to content
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

Migrate fully to new test naming scheme #50

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Check text value, shorten response
ryanwilson committed Dec 13, 2023
commit 90be0f0bdda6455f51beeb638e2c33f31a35e93d
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"content": {
"parts": [
{
"text": "The sky is blue because of a phenomenon called Rayleigh scattering. This refers to the scattering of light by particles that are smaller than the wavelength of light. In the case of the sky, the particles that are doing the scattering are molecules of nitrogen and oxygen.\n\nWhen sunlight hits these molecules, the shorter wavelengths of light (blue and violet) are scattered more than the longer wavelengths (red and orange). This is because the shorter wavelengths have a higher energy and are therefore more likely to interact with the molecules.\n\nThe scattered blue light is then redirected in all directions, which is why we see the sky as being blue. The amount of scattering depends on the wavelength of light and the size of the particles, which is why the sky appears to be a darker shade of blue when the sun is low in the sky (when the sunlight has to travel through more of the atmosphere to reach our eyes) and a lighter shade of blue when the sun is high in the sky (when the sunlight has to travel through less of the atmosphere to reach our eyes).\n\nIt is important to note that the sky is not actually blue. It only appears to be blue because of the way that light is scattered by the molecules in the atmosphere. If you were to travel to space, you would see that the sky is actually black."
"text": "This is the generated content."
}
]
},
2 changes: 1 addition & 1 deletion Tests/GoogleAITests/GenerativeModelTests.swift
Original file line number Diff line number Diff line change
@@ -393,7 +393,7 @@ final class GenerativeModelTests: XCTestCase {
let content = try await model.generateContent(testPrompt)
let promptFeedback = try XCTUnwrap(content.promptFeedback)
XCTAssertEqual(promptFeedback.safetyRatings.count, 0)
XCTAssertNotNil(content.text)
XCTAssertEqual(content.text, "This is the generated content.")
}

// MARK: - Generate Content (Streaming)